diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-10-26 08:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-10-26 08:29:10 +0000 |
commit | 66ae4baad173098544603718e9864f0da1c0c7a3 (patch) | |
tree | d8e6f387ee9b4d9b6936e3c21208e50b86daea60 /packaging/makeself | |
parent | Adding upstream version 1.18.0. (diff) | |
download | netdata-66ae4baad173098544603718e9864f0da1c0c7a3.tar.xz netdata-66ae4baad173098544603718e9864f0da1c0c7a3.zip |
Adding upstream version 1.18.1.upstream/1.18.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/makeself')
-rwxr-xr-x | packaging/makeself/install-or-update.sh | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh index 9796eb085..393525554 100755 --- a/packaging/makeself/install-or-update.sh +++ b/packaging/makeself/install-or-update.sh @@ -9,6 +9,9 @@ umask 002 # Be nice on production environments renice 19 $$ >/dev/null 2>/dev/null +NETDATA_PREFIX="/opt/netdata" +NETDATA_USER_CONFIG_DIR="${NETDATA_PREFIX}/etc/netdata" + # ----------------------------------------------------------------------------- if [ -d /opt/netdata/etc/netdata.old ]; then progress "Found old etc/netdata directory, reinstating this" @@ -21,16 +24,17 @@ if [ -d /opt/netdata/etc/netdata.old ]; then fi STARTIT=1 - -while [ ! -z "${1}" ] -do - if [ "${1}" = "--dont-start-it" ] - then - STARTIT=0 - else - echo >&2 "Unknown option '${1}'. Ignoring it." - fi - shift +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 done deleted_stock_configs=0 @@ -137,6 +141,22 @@ 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." +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" |