summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-03-19 00:08:49 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-03-19 00:08:49 +0200
commit00b2e6d14498314e5c2d113ec9ea8e132a0586ab (patch)
tree5c82e9bb2144357eac7a33f2c43aeb21deb1ac3a /netdata-installer.sh
parent249166805d7105a1f66b58dde6da15fb4ffc9524 (diff)
netdata-installer.sh suggest daily updates
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 72eece0aac..8713c8b930 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -1434,11 +1434,19 @@ REINSTALL
echo >&2
echo >&2 "${TPUT_DIM}${TPUT_BOLD}netdata-updater.sh${TPUT_RESET}${TPUT_DIM} can work from cron. It will trigger an email from cron"
echo >&2 "only if it fails (it does not print anything if it can update netdata).${TPUT_RESET}"
- if [ "${UID}" -eq 0 -a -d "/etc/cron.daily" -a ! -f "/etc/cron.daily/netdata-updater.sh" ]
- then
- 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 /etc/cron.daily/netdata-updater.sh${TPUT_RESET}"
+ if [ "${UID}" -eq "0" ]
+ then
+ if [ -d "/etc/cron.daily" -a ! -f "/etc/cron.daily/netdata-updater.sh" ]
+ then
+ 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 /etc/cron.daily/netdata-updater.sh${TPUT_RESET}"
+ elif [ -d "/etc/periodic/daily" -a ! -f "/etc/periodic/daily/netdata-updater.sh" ]
+ then
+ 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 /etc/periodic/daily/netdata-updater.sh${TPUT_RESET}"
+ fi
fi
elif [ -f "netdata-updater.sh" ]
then