From cc0de9f292c4bc1e91a8ec27114624c3b4e8becf Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Tue, 14 Jan 2020 07:45:57 -0500 Subject: 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> --- netdata-installer.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'netdata-installer.sh') 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 <