]> arthur.barton.de Git - netdata.git/commitdiff
minor improvements for non-linux systems
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 8 Feb 2017 20:00:09 +0000 (22:00 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 8 Feb 2017 20:00:09 +0000 (22:00 +0200)
conf.d/Makefile.am
netdata-installer.sh

index 3c733aa168b2a95e870670f59288562c57b93aee..7b364a62319be6a410531847aa2160aba8ac44c1 100644 (file)
@@ -62,38 +62,38 @@ dist_healthconfig_DATA = \
     health.d/apache.conf \
     health.d/backend.conf \
     health.d/bind_rndc.conf \
-    health.d/disks.conf \
     health.d/elasticsearch.conf \
-    health.d/entropy.conf \
     health.d/fping.conf \
     health.d/haproxy.conf \
-    health.d/ipc.conf \
     health.d/ipfs.conf \
     health.d/isc_dhcpd.conf \
     health.d/mdstat.conf \
     health.d/memcached.conf \
-    health.d/memory.conf \
     health.d/mysql.conf \
     health.d/named.conf \
-    health.d/net.conf \
-    health.d/netfilter.conf \
     health.d/nginx.conf \
     health.d/postgres.conf \
-    health.d/qos.conf \
     health.d/redis.conf \
     health.d/retroshare.conf \
-    health.d/softnet.conf \
     health.d/squid.conf \
-    health.d/tcp_resets.conf \
-    health.d/udp_errors.conf \
     health.d/varnish.conf \
     $(NULL)
 
 if LINUX
 dist_healthconfig_DATA += \
     health.d/cpu.conf \
+    health.d/disks.conf \
+    health.d/entropy.conf \
+    health.d/ipc.conf \
+    health.d/memory.conf \
+    health.d/net.conf \
+    health.d/netfilter.conf \
+    health.d/qos.conf \
     health.d/ram.conf \
+    health.d/softnet.conf \
     health.d/swap.conf \
+    health.d/tcp_resets.conf \
+    health.d/udp_errors.conf \
     $(NULL)
 endif LINUX
 
index 9b080caed1d641ca43d26c39714e16ec2217662a..4e1847fa3cd1c41974b0b6a659ea91015d7416ca 100755 (executable)
@@ -29,7 +29,7 @@ umask 002
 # Be nice on production environments
 renice 19 $$ >/dev/null 2>/dev/null
 
-processors=$(grep ^processor </proc/cpuinfo | wc -l)
+processors=$(grep ^processor </proc/cpuinfo 2>/dev/null | wc -l)
 [ $(( processors )) -lt 1 ] && processors=1
 
 # you can set CFLAGS before running installer
@@ -69,6 +69,7 @@ banner() {
     echo >&2
 }
 
+setcap="$(which setcap 2>/dev/null || command -v setcap 2>/dev/null)"
 service="$(which service 2>/dev/null || command -v service 2>/dev/null)"
 systemctl="$(which systemctl 2>/dev/null || command -v systemctl 2>/dev/null)"
 service() {
@@ -853,8 +854,11 @@ if [ ${UID} -eq 0 ]
     setcap_ret=1
     if ! iscontainer
         then
-        run setcap cap_dac_read_search,cap_sys_ptrace+ep "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin"
-        setcap_ret=$?
+        if [ ! -z "${setcap}" ]
+            then
+            run setcap cap_dac_read_search,cap_sys_ptrace+ep "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin"
+            setcap_ret=$?
+        fi
 
         if [ ${setcap_ret} -eq 0 ]
             then