diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2022-02-18 20:35:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 20:35:14 -0500 |
commit | a24f5bd75c1d720cd31f4c4defb25ba010f17269 (patch) | |
tree | 0e482ea95501f573dd49915a3733486e7a371bab /packaging/makeself/install-or-update.sh | |
parent | 698f01fb06efc02ee3d81b4fa68315f8497e9bda (diff) |
Revert "Overhaul handling of auto-updates in the installer code. (#12076)" (#12182)
This reverts commit da7f215ad6c98cbf54ab93dbc1d2457ac01dbb08.
Diffstat (limited to 'packaging/makeself/install-or-update.sh')
-rwxr-xr-x | packaging/makeself/install-or-update.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh index 6a4cd5b971..2fd7629b20 100755 --- a/packaging/makeself/install-or-update.sh +++ b/packaging/makeself/install-or-update.sh @@ -26,6 +26,7 @@ if [ -d /opt/netdata/etc/netdata.old ]; then fi STARTIT=1 +AUTOUPDATE=0 REINSTALL_OPTIONS="" RELEASE_CHANNEL="nightly" # check .travis/create_artifacts.sh before modifying @@ -35,7 +36,10 @@ while [ "${1}" ]; do STARTIT=0 REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}" ;; - "--auto-update" | "-u") ;; + "--auto-update" | "-u") + AUTOUPDATE=1 + REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}" + ;; "--stable-channel") RELEASE_CHANNEL="stable" REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}" @@ -157,6 +161,13 @@ progress "Install (but not enable) netdata updater tool" cleanup_old_netdata_updater || run_failed "Cannot cleanup old netdata updater tool." install_netdata_updater || run_failed "Cannot install netdata updater tool." +progress "Check if we must enable/disable the netdata updater tool" +if [ "${AUTOUPDATE}" = "1" ]; then + enable_netdata_updater || run_failed "Cannot enable netdata updater tool" +else + disable_netdata_updater || run_failed "Cannot disable netdata updater tool" +fi + # ----------------------------------------------------------------------------- progress "creating quick links" |