From 6aaf5ba7ed0980c14bdc554fc8839a2126455ed5 Mon Sep 17 00:00:00 2001 From: Lennart Weller Date: Mon, 18 Sep 2017 00:17:33 +0200 Subject: New upstream version 1.8.0+dfsg --- netdata-installer.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'netdata-installer.sh') diff --git a/netdata-installer.sh b/netdata-installer.sh index 35cb850fb..f3f444f66 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -49,7 +49,7 @@ umask 002 # Be nice on production environments renice 19 $$ >/dev/null 2>/dev/null -processors=$(cat /proc/cpuinfo 2>/dev/null | grep ^processor | wc -l) +processors=$(grep -c ^processor /proc/cpuinfo) [ $(( processors )) -lt 1 ] && processors=1 # you can set CFLAGS before running installer @@ -392,8 +392,10 @@ if [ ${DONOTWAIT} -eq 0 ] if [ ! -z "${NETDATA_PREFIX}" ] then eval "read >&2 -ep \$'\001${TPUT_BOLD}${TPUT_GREEN}\002Press ENTER to build and install netdata to \'\001${TPUT_CYAN}\002${NETDATA_PREFIX}\001${TPUT_YELLOW}\002\'\001${TPUT_RESET}\002 > ' -e -r REPLY" + [ $? -ne 0 ] && exit 1 else eval "read >&2 -ep \$'\001${TPUT_BOLD}${TPUT_GREEN}\002Press ENTER to build and install netdata to your system\001${TPUT_RESET}\002 > ' -e -r REPLY" + [ $? -ne 0 ] && exit 1 fi fi @@ -405,7 +407,7 @@ build_error() { Sorry! netdata failed to build... -You many need to check these: +You may need to check these: 1. The package uuid-dev (or libuuid-devel) has to be installed. @@ -782,6 +784,12 @@ if [ ${UID} -eq 0 ] run chmod 4755 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/freeipmi.plugin" fi + if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network" ] + then + run chown root "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network" + run chmod 4755 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network" + fi + else run chown "${NETDATA_USER}:${NETDATA_USER}" "${NETDATA_LOG_DIR}" run chown -R "${NETDATA_USER}:${NETDATA_USER}" "${NETDATA_PREFIX}/usr/libexec/netdata" @@ -1046,6 +1054,18 @@ if [ -f /etc/init.d/netdata ] rm -i /etc/init.d/netdata fi +if [ -f /etc/periodic/daily/netdata-updater ] + then + echo "Deleting /etc/periodic/daily/netdata-updater ..." + rm -i /etc/periodic/daily/netdata-updater +fi + +if [ -f /etc/cron.daily/netdata-updater ] + then + echo "Deleting /etc/cron.daily/netdata-updater ..." + rm -i /etc/cron.daily/netdata-updater +fi + getent passwd netdata > /dev/null if [ $? -eq 0 ] then -- cgit v1.2.3