diff options
-rw-r--r-- | packaging/installer/functions.sh | 4 | ||||
-rwxr-xr-x | packaging/makeself/install-or-update.sh | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh index 363998e96c..03dd8dc89a 100644 --- a/packaging/installer/functions.sh +++ b/packaging/installer/functions.sh @@ -820,3 +820,7 @@ disable_netdata_updater() { return 0 } + +set_netdata_updater_channel() { + sed -e "s/^RELEASE_CHANNEL=.*/RELEASE_CHANNEL=\"${RELEASE_CHANNEL}\"/" -i "${NETDATA_USER_CONFIG_DIR}/.environment" +} diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh index 21b7bf2e08..393525554b 100755 --- a/packaging/makeself/install-or-update.sh +++ b/packaging/makeself/install-or-update.sh @@ -25,11 +25,13 @@ fi STARTIT=1 AUTOUPDATE=0 +RELEASE_CHANNEL="nightly" while [ "${1}" ]; do case "${1}" in "--dont-start-it") STARTIT=0;; "--auto-update"|"-u") AUTOUPDATE=1;; + "--stable-channel") RELEASE_CHANNEL="stable";; *) echo >&2 "Unknown option '${1}'. Ignoring it.";; esac shift 1 @@ -139,6 +141,9 @@ progress "Install netdata at system init" install_netdata_service || run_failed "Cannot install netdata init service." +set_netdata_updater_channel || run_failed "Cannot set netdata updater tool release channel to '${RELEASE_CHANNEL}'" + + # ----------------------------------------------------------------------------- progress "Install (but not enable) netdata updater tool" cleanup_old_netdata_updater || run_failed "Cannot cleanup old netdata updater tool." |