diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:48 +0000 |
commit | cd7ed12292aef11d9062b64f61215174e8cc1860 (patch) | |
tree | 9998ab03d153956743d9319cf3a0279b9593ce36 /packaging/installer/functions.sh | |
parent | Releasing debian version 1.16.1-6. (diff) | |
download | netdata-cd7ed12292aef11d9062b64f61215174e8cc1860.tar.xz netdata-cd7ed12292aef11d9062b64f61215174e8cc1860.zip |
Merging upstream version 1.17.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/installer/functions.sh')
-rw-r--r-- | packaging/installer/functions.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh index 6f9996906..2e3044340 100644 --- a/packaging/installer/functions.sh +++ b/packaging/installer/functions.sh @@ -380,10 +380,17 @@ install_netdata_service() { fi if [ "${SYSTEMD_DIRECTORY}x" != "x" ]; then + ENABLE_NETDATA_IF_PREVIOUSLY_ENABLED="run systemctl enable netdata" + IS_NETDATA_ENABLED="$(systemctl is-enabled netdata 2> /dev/null || echo "Netdata not there")" + if [ "${IS_NETDATA_ENABLED}" == "disabled" ]; then + echo >&2 "Netdata was there and disabled, make sure we don't re-enable it ourselves" + ENABLE_NETDATA_IF_PREVIOUSLY_ENABLED="true" + fi + echo >&2 "Installing systemd service..." run cp system/netdata.service "${SYSTEMD_DIRECTORY}/netdata.service" && run systemctl daemon-reload && - run systemctl enable netdata && + ${ENABLE_NETDATA_IF_PREVIOUSLY_ENABLED} && return 0 else echo >&2 "no systemd directory; cannot install netdata.service" |