]> arthur.barton.de Git - netdata.git/commitdiff
netdata-installer.sh suggest daily updates
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 18 Mar 2017 22:08:49 +0000 (00:08 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 18 Mar 2017 22:08:49 +0000 (00:08 +0200)
netdata-installer.sh

index 72eece0aac20275075a1271b1c8fc4a1c4ed27f5..8713c8b930e0bbd1cca2d35526c7c6829a5eb8d2 100755 (executable)
@@ -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