summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2020-01-14 07:45:57 -0500
committerGitHub <noreply@github.com>2020-01-14 07:45:57 -0500
commitcc0de9f292c4bc1e91a8ec27114624c3b4e8becf (patch)
tree79a73aa59833d4eb02ca5b1811dbb4ddc89d2677 /netdata-installer.sh
parent51e6a41ab140daeaefdbeb1349ac098aa97145ce (diff)
Make auto-updates work on kickstart-static64 installs. (#7704)
* Store only the options for reinstall, not the full command. This simplifies handling of updates with the static installer. * Properly utilize the updater for static installs. * Disable auto-updater when using local files. If using local files, we can probably assume a system without a network connection, so don't enable the auto-updater. * Document support for auto-updates from kickstart-static64 * Fix infinite loop in auto-update option. * Update kickstart-static64 checksum in docs. * Remove unnecessary `sed` argument. Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> Co-authored-by: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 051aa09266..8dcb3996f7 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -93,16 +93,12 @@ printf 'LDFLAGS="%s" ' "${LDFLAGS}" >>netdata-installer.log
printf "%q " "${PROGRAM}" "${@}" >>netdata-installer.log
printf "\\n" >>netdata-installer.log
-REINSTALL_COMMAND="$(
- printf "%q " "${PROGRAM}" "${@}"
+REINSTALL_OPTIONS="$(
+ printf "%s" "${*}"
printf "\\n"
)"
# remove options that shown not be inherited by netdata-updater.sh
-REINSTALL_COMMAND="${REINSTALL_COMMAND// --dont-wait/}"
-REINSTALL_COMMAND="${REINSTALL_COMMAND// --dont-start-it/}"
-if [ "${REINSTALL_COMMAND:0:1}" != "." ] && [ "${REINSTALL_COMMAND:0:1}" != "/" ] && [ -f "./${PROGRAM}" ]; then
- REINSTALL_COMMAND="./${REINSTALL_COMMAND}"
-fi
+REINSTALL_OPTIONS="$(echo "${REINSTALL_OPTIONS}" | sed 's/--dont-wait//g' | sed 's/--dont-start-it//g')"
banner_nonroot_install() {
cat <<NONROOTNOPREFIX
@@ -1099,7 +1095,7 @@ NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS}"
NETDATA_ADDED_TO_GROUPS="${NETDATA_ADDED_TO_GROUPS}"
INSTALL_UID="${UID}"
NETDATA_GROUP="${NETDATA_GROUP}"
-REINSTALL_COMMAND="${REINSTALL_COMMAND}"
+REINSTALL_OPTIONS="${REINSTALL_OPTIONS}"
RELEASE_CHANNEL="${RELEASE_CHANNEL}"
IS_NETDATA_STATIC_BINARY="${IS_NETDATA_STATIC_BINARY}"
NETDATA_LIB_DIR="${NETDATA_LIB_DIR}"