summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@tsaousis.gr>2016-12-20 22:06:04 +0200
committerCosta Tsaousis <costa@tsaousis.gr>2016-12-20 22:06:04 +0200
commit00e59130d0ced9b39f6d9df96a4cb6851568c117 (patch)
treed63a96881d1010b55f4471c0da852b1081194261 /netdata-installer.sh
parentb7f0d82da1efa21bd3e469cbce0959595c2e0138 (diff)
check /proc only when it is available
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 10c7c18bb8..431178d9df 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -836,9 +836,13 @@ fi
# stop a running netdata
isnetdata() {
- [ -z "$1" -o ! -f "/proc/$1/stat" ] && return 1
- [ "$(cat "/proc/$1/stat" | cut -d '(' -f 2 | cut -d ')' -f 1)" = "netdata" ] && return 0
- return 1
+ if [ -d /proc ]
+ then
+ [ -z "$1" -o ! -f "/proc/$1/stat" ] && return 1
+ [ "$(cat "/proc/$1/stat" | cut -d '(' -f 2 | cut -d ')' -f 1)" = "netdata" ] && return 0
+ return 1
+ fi
+ return 0
}
stop_netdata_on_pid() {