summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>2019-10-18 17:00:24 +0300
committerGitHub <noreply@github.com>2019-10-18 17:00:24 +0300
commitcd097aad6f29e41340c275448e1e3398f0bb8396 (patch)
treeab81f1e9b2c5afb5a6f86082fc04394c338ec72e
parenteb01440d2a88fd162f4063a11cd476e185f913ee (diff)
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
-rw-r--r--packaging/installer/functions.sh4
-rwxr-xr-xpackaging/makeself/install-or-update.sh5
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."