netdata-installer.sh suggest daily updates
Costa Tsaousis (ktsaou) committed
Mar 19, 2017 at 00:08 UTC
00b2e6d14498314e5c2d113ec9ea8e132a0586ab
1 file changed
+13
-5
netdata-installer.sh
+13
-5
@@ -1434,11 +1434,19 @@ REINSTALL
1434
echo >&2
1435
echo >&2 "${TPUT_DIM}${TPUT_BOLD}netdata-updater.sh${TPUT_RESET}${TPUT_DIM} can work from cron. It will trigger an email from cron"
1436
echo >&2 "only if it fails (it does not print anything if it can update netdata).${TPUT_RESET}"
1437
- if [ "${UID}" -eq 0 -a -d "/etc/cron.daily" -a ! -f "/etc/cron.daily/netdata-updater.sh" ]
1438
- then
1439
- echo >&2 "${TPUT_DIM}Run this to automatically check and install netdata updates once per day:${TPUT_RESET}"
1440
- echo >&2
1441
- echo >&2 "${TPUT_YELLOW}${TPUT_BOLD}ln -s ${PWD}/netdata-updater.sh /etc/cron.daily/netdata-updater.sh${TPUT_RESET}"
1437
+ if [ "${UID}" -eq "0" ]
1438
+ then
1439
+ if [ -d "/etc/cron.daily" -a ! -f "/etc/cron.daily/netdata-updater.sh" ]
1440
+ then
1441
+ echo >&2 "${TPUT_DIM}Run this to automatically check and install netdata updates once per day:${TPUT_RESET}"
1442
+ echo >&2
1443
+ echo >&2 "${TPUT_YELLOW}${TPUT_BOLD}ln -s ${PWD}/netdata-updater.sh /etc/cron.daily/netdata-updater.sh${TPUT_RESET}"
1444
+ elif [ -d "/etc/periodic/daily" -a ! -f "/etc/periodic/daily/netdata-updater.sh" ]
1445
+ then
1446
+ echo >&2 "${TPUT_DIM}Run this to automatically check and install netdata updates once per day:${TPUT_RESET}"
1447
+ echo >&2
1448
+ echo >&2 "${TPUT_YELLOW}${TPUT_BOLD}ln -s ${PWD}/netdata-updater.sh /etc/periodic/daily/netdata-updater.sh${TPUT_RESET}"
1449
+ fi
1450
fi
1451
elif [ -f "netdata-updater.sh" ]
1452
then