summaryrefslogtreecommitdiffstats
path: root/daemon/anonymous-statistics.sh.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-16 07:50:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-16 07:50:45 +0000
commit87cce1817d03daca8c31be82d781ec47a4560087 (patch)
tree06cb3e407ea32dcc385cbe4fb77e251e34bc1e68 /daemon/anonymous-statistics.sh.in
parentReleasing debian version 1.12.2-2. (diff)
downloadnetdata-87cce1817d03daca8c31be82d781ec47a4560087.tar.xz
netdata-87cce1817d03daca8c31be82d781ec47a4560087.zip
Merging upstream version 1.13.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/anonymous-statistics.sh.in')
-rwxr-xr-xdaemon/anonymous-statistics.sh.in13
1 files changed, 7 insertions, 6 deletions
diff --git a/daemon/anonymous-statistics.sh.in b/daemon/anonymous-statistics.sh.in
index f4375b101..d4622c6d9 100755
--- a/daemon/anonymous-statistics.sh.in
+++ b/daemon/anonymous-statistics.sh.in
@@ -85,13 +85,14 @@ fi
# -------------------------------------------------------------------------------------------------
# detect containers with heuristics
-if [ "${CONTAINER}" = "unknown" ] ; then
- IFS='(, ' read -r process _ </proc/1/sched
- if [ "${process}" = "netdata" ]; then
- CONTAINER="container"
- CONT_DETECTION="process"
+if [ "${CONTAINER}" = "unknown" ]; then
+ if [ -f /proc/1/sched ] ; then
+ IFS='(, ' read -r process _ </proc/1/sched
+ if [ "${process}" = "netdata" ]; then
+ CONTAINER="container"
+ CONT_DETECTION="process"
+ fi
fi
-
# ubuntu and debian supply /bin/running-in-container
# https://www.apt-browse.org/browse/ubuntu/trusty/main/i386/upstart/1.12.1-0ubuntu4/file/bin/running-in-container
if /bin/running-in-container >/dev/null 2>&1; then