diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2022-02-18 10:08:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 10:08:38 -0500 |
commit | da7f215ad6c98cbf54ab93dbc1d2457ac01dbb08 (patch) | |
tree | e8a02e870c9a45a8ba2e45614d25254b1cea7a1f /netdata-installer.sh | |
parent | f3e8c077cfdaebd8073927803a2a4707a302d26a (diff) |
Overhaul handling of auto-updates in the installer code. (#12076)
* Bundle updater script in native packages.
* Move code for enabling/disabling auto-updates to netdata-updater.sh
This lets us handle the logic sanely from the kickstart script
regardless of the install method, and allows users to more reliably
toggle auto-updates themselves without having to understand what is
being done.
* Add proper case-agnosticism to auto-update type selection.
* Move auto-updater handling code to kickstart script.
* Properly handle running against an older source tree.
* First part of updater docmentation updates.
* Fixed handling of updater in DEB packages.
* Further documentation updates.
* Minor typo fixes.
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 158c8f8391..f1115ac410 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')" ;; @@ -1896,13 +1881,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" |