diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
commit | d079b656b4719739b2247dcd9d46e9bec793095a (patch) | |
tree | d2c950c70a776bcf697c963151c5bd959f8a9f03 /netdata-installer.sh | |
parent | Releasing debian version 1.37.1-2. (diff) | |
download | netdata-d079b656b4719739b2247dcd9d46e9bec793095a.tar.xz netdata-d079b656b4719739b2247dcd9d46e9bec793095a.zip |
Merging upstream version 1.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | netdata-installer.sh | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh index 94745a29..e45eead1 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -163,10 +163,6 @@ banner_nonroot_install() { $PROGRAM ${@} --install-prefix /tmp - or - - $PROGRAM ${@} --install /tmp - or, run the installer as root: sudo $PROGRAM ${@} @@ -203,8 +199,7 @@ usage() { USAGE: ${PROGRAM} [options] where options include: - --install <path> Install netdata in <path>. Ex. --install /opt will put netdata in /opt/netdata, this option is deprecated and will be removed in a future version, please use --install-prefix instead. - --install-prefix <path> Install netdata in <path>. Ex. --install-prefix /opt will put netdata in /opt/netdata. + --install-prefix <path> Install netdata in <path>. Ex. --install-prefix /opt will put netdata in /opt/netdata. --dont-start-it Do not (re)start netdata after installation. --dont-wait Run installation in non-interactive mode. --stable-channel Use packages from GitHub release pages instead of nightly updates. @@ -337,8 +332,6 @@ while [ -n "${1}" ]; do NETDATA_CONFIGURE_OPTIONS="$(echo "${NETDATA_CONFIGURE_OPTIONS%--disable-ml)}" | sed 's/$/ --disable-ml/g')" NETDATA_ENABLE_ML=0 ;; - "--enable-ml-tests") NETDATA_CONFIGURE_OPTIONS="$(echo "${NETDATA_CONFIGURE_OPTIONS%--enable-ml-tests)}" | sed 's/$/ --enable-ml-tests/g')" ;; - "--disable-ml-tests") NETDATA_CONFIGURE_OPTIONS="$(echo "${NETDATA_CONFIGURE_OPTIONS%--disable-ml-tests)}" | sed 's/$/ --disable-ml-tests/g')" ;; "--disable-lto") NETDATA_CONFIGURE_OPTIONS="$(echo "${NETDATA_CONFIGURE_OPTIONS%--disable-lto)}" | sed 's/$/ --disable-lto/g')" ;; "--disable-x86-sse") NETDATA_CONFIGURE_OPTIONS="$(echo "${NETDATA_CONFIGURE_OPTIONS%--disable-x86-sse)}" | sed 's/$/ --disable-x86-sse/g')" ;; "--disable-telemetry") NETDATA_DISABLE_TELEMETRY=1 ;; @@ -366,10 +359,6 @@ while [ -n "${1}" ]; do "--build-json-c") NETDATA_BUILD_JSON_C=1 ;; - "--install") - NETDATA_PREFIX="${2}/netdata" - shift 1 - ;; "--install-prefix") NETDATA_PREFIX="${2}/netdata" shift 1 @@ -440,7 +429,7 @@ if [ "$(uname -s)" = "Linux" ] && [ -f /proc/meminfo ]; then target_ram="$(echo "${target_ram}" | awk '{$1/=1024*1024*1024;printf "%.2fGiB\n",$1}')" total_ram="$(echo "${total_ram}" | awk '{$1/=1024*1024*1024;printf "%.2fGiB\n",$1}')" run_failed "Netdata needs ${target_ram} of RAM to safely install, but this system only has ${total_ram}. Try reducing the number of processes used for the install using the \$MAKEOPTS variable." - exit_reason "Insufficent RAM to safely install." I000F + exit_reason "Insufficient RAM to safely install." I000F exit 2 fi fi @@ -1089,6 +1078,11 @@ if [ "$(id -u)" -eq 0 ]; then # shellcheck disable=SC2086 portable_add_user_to_group ${g} netdata && NETDATA_ADDED_TO_GROUPS="${NETDATA_ADDED_TO_GROUPS} ${g}" done + # Netdata must be able to read /etc/pve/qemu-server/* and /etc/pve/lxc/* + # for reading VMs/containers names, CPU and memory limits on Proxmox. + if [ -d "/etc/pve" ]; then + portable_add_user_to_group "www-data" netdata && NETDATA_ADDED_TO_GROUPS="${NETDATA_ADDED_TO_GROUPS} www-data" + fi else run_failed "The installer does not run as root. Nothing to do for user and groups" fi @@ -1206,8 +1200,8 @@ run chmod 770 "${NETDATA_CLAIMING_DIR}" if [ "$(id -u)" -eq 0 ]; then # find the admin group admin_group= - test -z "${admin_group}" && getent group root > /dev/null 2>&1 && admin_group="root" - test -z "${admin_group}" && getent group daemon > /dev/null 2>&1 && admin_group="daemon" + test -z "${admin_group}" && get_group root > /dev/null 2>&1 && admin_group="root" + test -z "${admin_group}" && get_group daemon > /dev/null 2>&1 && admin_group="daemon" test -z "${admin_group}" && admin_group="${NETDATA_GROUP}" run chown "${NETDATA_USER}:${admin_group}" "${NETDATA_LOG_DIR}" |