diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2022-03-22 08:48:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 08:48:06 -0400 |
commit | c77e3530886ca4c439dad7fa9533e3c032cfdfc5 (patch) | |
tree | cf7442fd715f0cb339e9c554ad791e656ce34d6d /netdata-installer.sh | |
parent | 4a4817d8a4569810bf6883d1fc56f39221f19cc7 (diff) |
Switch to using netdata-updater.sh to toggle auto updates on and off when installing. (#12296)
* Switch to using netdata-updater.sh to toggle auto updates on and off on install.
* Apply suggestions from code review
Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
* Make heading name less ambiguous.
* Fix fallback case for unsupported updater script.
* Fix invalid function name.
Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-x | netdata-installer.sh | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh index 3de15622f8..545fe61fb4 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -226,9 +226,6 @@ USAGE: ${PROGRAM} [options] --install <path> Install netdata in <path>. Ex. --install /opt will put netdata in /opt/netdata. --dont-start-it Do not (re)start netdata after installation. --dont-wait Run installation in non-interactive mode. - --auto-update or -u Install netdata-updater in cron to automatically check for updates once per day. - --auto-update-type Override the auto-update scheduling mechanism detection, currently supported types - are: systemd, interval, crontab. --stable-channel Use packages from GitHub release pages instead of nightly updates. This results in less frequent updates. --nightly-channel Use most recent nightly updates instead of GitHub releases. @@ -301,7 +298,6 @@ HEREDOC DONOTSTART=0 DONOTWAIT=0 -AUTOUPDATE=0 NETDATA_PREFIX= LIBS_ARE_HERE=0 NETDATA_ENABLE_ML="" @@ -319,19 +315,8 @@ while [ -n "${1}" ]; do "--dont-scrub-cflags-even-though-it-may-break-things") DONT_SCRUB_CFLAGS_EVEN_THOUGH_IT_MAY_BREAK_THINGS=1 ;; "--dont-start-it") DONOTSTART=1 ;; "--dont-wait") DONOTWAIT=1 ;; - "--auto-update" | "-u") AUTOUPDATE=1 ;; - "--auto-update-type") - AUTO_UPDATE_TYPE="$(echo "${2}" | tr '[:upper:]' '[:lower:]')" - case "${AUTO_UPDATE_TYPE}" in - systemd|interval|crontab) - shift 1 - ;; - *) - echo "Unrecognized value for --auto-update-type. Valid values are: systemd, interval, crontab" - exit 1 - ;; - esac - ;; + "--auto-update" | "-u") ;; + "--auto-update-type") ;; "--stable-channel") RELEASE_CHANNEL="stable" ;; "--nightly-channel") RELEASE_CHANNEL="nightly" ;; "--enable-plugin-freeipmi") NETDATA_CONFIGURE_OPTIONS="$(echo "${NETDATA_CONFIGURE_OPTIONS%--enable-plugin-freeipmi)}" | sed 's/$/ --enable-plugin-freeipmi/g')" ;; @@ -1955,13 +1940,6 @@ progress "Installing (but not enabling) the 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 "${AUTO_UPDATE_TYPE}" || run_failed "Cannot enable netdata updater tool" -else - disable_netdata_updater || run_failed "Cannot disable netdata updater tool" -fi - # ----------------------------------------------------------------------------- progress "Wrap up environment set up" |