@cryptotaxi247 / netdata-1 / commits / cd097aad6

7040 enable stable channel option (#7082)

* Partial fix for #7040 install-or-update.sh now accepts the --stable-channel option * Add missing quotes to sed command

Konstantinos Natsakis committed Oct 18, 2019 at 17:00 UTC cd097aad6f29e41340c275448e1e3398f0bb8396
2 files changed +9
packaging/installer/functions.sh
+4
@@ -820,3 +820,7 @@ disable_netdata_updater() {
820
821 return 0
822 }
823 +
824 +set_netdata_updater_channel() {
825 + sed -e "s/^RELEASE_CHANNEL=.*/RELEASE_CHANNEL=\"${RELEASE_CHANNEL}\"/" -i "${NETDATA_USER_CONFIG_DIR}/.environment"
826 +}
packaging/makeself/install-or-update.sh
+5
@@ -25,11 +25,13 @@ fi
25
26 STARTIT=1
27 AUTOUPDATE=0
28 +RELEASE_CHANNEL="nightly"
29
30 while [ "${1}" ]; do
31 case "${1}" in
32 "--dont-start-it") STARTIT=0;;
33 "--auto-update"|"-u") AUTOUPDATE=1;;
34 + "--stable-channel") RELEASE_CHANNEL="stable";;
35 *) echo >&2 "Unknown option '${1}'. Ignoring it.";;
36 esac
37 shift 1
@@ -139,6 +141,9 @@ progress "Install netdata at system init"
141 install_netdata_service || run_failed "Cannot install netdata init service."
142
143
144 +set_netdata_updater_channel || run_failed "Cannot set netdata updater tool release channel to '${RELEASE_CHANNEL}'"
145 +
146 +
147 # -----------------------------------------------------------------------------
148 progress "Install (but not enable) netdata updater tool"
149 cleanup_old_netdata_updater || run_failed "Cannot cleanup old netdata updater tool."