summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorTasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com>2023-06-02 11:17:57 +0300
committerGitHub <noreply@github.com>2023-06-02 11:17:57 +0300
commite2063caa04f026866514f368b2f72b9741405e45 (patch)
tree5b374e7936f40447d54ddf6bde52ea0e4d1e01ee /packaging
parent65a8d2fa3ede8760051834bcd0b95d64258a33a1 (diff)
Provide necessary permission for the kickstart to run the netdata-updater script (#15132)
Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/installer/kickstart.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh
index 689fc1efc8..115d53b7c1 100755
--- a/packaging/installer/kickstart.sh
+++ b/packaging/installer/kickstart.sh
@@ -745,7 +745,7 @@ confirm() {
update() {
updater="${ndprefix}/usr/libexec/netdata/netdata-updater.sh"
- if [ -x "${updater}" ]; then
+ if run_as_root test -x "${updater}"; then
if [ "${DRY_RUN}" -eq 1 ]; then
progress "Would attempt to update existing installation by running the updater script located at: ${updater}"
return 0
@@ -1204,9 +1204,9 @@ claim() {
# ======================================================================
# Auto-update handling code.
set_auto_updates() {
- if [ -x "${INSTALL_PREFIX}/usr/libexec/netdata/netdata-updater.sh" ]; then
+ if run_as_root test -x "${INSTALL_PREFIX}/usr/libexec/netdata/netdata-updater.sh"; then
updater="${INSTALL_PREFIX}/usr/libexec/netdata/netdata-updater.sh"
- elif [ -x "${INSTALL_PREFIX}/netdata/usr/libexec/netdata/netdata-updater.sh" ]; then
+ elif run_as_root test -x "${INSTALL_PREFIX}/netdata/usr/libexec/netdata/netdata-updater.sh"; then
updater="${INSTALL_PREFIX}/netdata/usr/libexec/netdata/netdata-updater.sh"
else
warning "Could not find netdata-updater.sh. This means that auto-updates cannot (currently) be enabled on this system. See https://learn.netdata.cloud/docs/agent/packaging/installer/update for more information about updating Netdata."
@@ -1217,7 +1217,7 @@ set_auto_updates() {
if [ "${DRY_RUN}" -eq 1 ]; then
progress "Would have attempted to enable automatic updates."
# This first case is for catching using a new kickstart script with an old build. It can be safely removed after v1.34.0 is released.
- elif ! grep -q '\-\-enable-auto-updates' "${updater}"; then
+ elif ! run_as_root grep -q '\-\-enable-auto-updates' "${updater}"; then
echo
elif ! run_as_root "${updater}" --enable-auto-updates "${NETDATA_AUTO_UPDATE_TYPE}"; then
warning "Failed to enable auto updates. Netdata will still work, but you will need to update manually."