summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorPaul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com>2019-05-13 15:47:05 +0300
committerGitHub <noreply@github.com>2019-05-13 15:47:05 +0300
commitf03c9ed28e60f51fa932dddc982bc4a7b70a7ee9 (patch)
treeb80db41a7083f499bab7f7cfc77b165f4bdff228 /netdata-installer.sh
parent198c7fa3e34c71bc075bcfb067da80242e74bddf (diff)
netdata/packaging: Do not install netdata service when within docker (#5947)
* netdata/packaging: Add more to the available distributions, for more consistent installs * Revert "netdata/packaging: Add more to the available distributions, for more consistent installs" This reverts commit d04e664dba2f0a0c69f70615297feb7034839683. This was the wrong approach, what we only want is to basically restrict installing a service for docker installations. There will be a follow up commit for this * netdata/installer: Dont install netdata service scripts when running within docker containers
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index dfa14cfe71..3328053a80 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -810,7 +810,12 @@ install_go
progress "Install netdata at system init"
NETDATA_START_CMD="${NETDATA_PREFIX}/usr/sbin/netdata"
-install_netdata_service || run_failed "Cannot install netdata init service."
+
+if grep -q docker /proc/1/cgroup >/dev/null 2>&1; then
+ echo >&2 "We are running within a docker container, will not be installing netdata service"
+else
+ install_netdata_service || run_failed "Cannot install netdata init service."
+fi
# -----------------------------------------------------------------------------
# check if we can re-start netdata