summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-05-22 12:38:16 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-05-22 12:38:16 +0300
commitcac596c72c74807a9510e0373710c3704cfdf3a8 (patch)
tree9b76a05339169ba6b3a39b32fe9fb71bcf81696c /netdata-installer.sh
parent923b0a29b26067b94f7ed453f4ddee33746dbea2 (diff)
properly show error messages if auto-update cannot be installed
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 6c3398c304..a6153b92da 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -1283,15 +1283,18 @@ REINSTALL
else
echo >&2 "${TPUT_DIM}Run this to automatically check and install netdata updates once per day:${TPUT_RESET}"
echo >&2
- echo >&2 "${TPUT_YELLOW}${TPUT_BOLD}ln -s ${PWD}/netdata-updater.sh ${crondir}/netdata-updater${TPUT_RESET}"
+ echo >&2 "${TPUT_YELLOW}${TPUT_BOLD}sudo ln -s ${PWD}/netdata-updater.sh ${crondir}/netdata-updater${TPUT_RESET}"
fi
- elif [ "${AUTOUPDATE}" = "1" ]
- then
+ else
progress "Refreshing netdata-updater at cron"
run rm "${crondir}/netdata-updater"
run ln -s "${PWD}/netdata-updater.sh" "${crondir}/netdata-updater"
fi
+ else
+ [ "${AUTOUPDATE}" = "1" ] && echo >&2 "Cannot figure out the cron directory to install netdata-updater."
fi
+ else
+ [ "${AUTOUPDATE}" = "1" ] && echo >&2 "You need to run the installer as root for auto-updating via cron."
fi
else
[ -f "netdata-updater.sh" ] && rm "netdata-updater.sh"