modules/freifunk: setup config and cron jobs for rdate; sync time on boot
[project/luci.git] / modules / freifunk / root / etc / init.d / freifunk
index 801dd5b..79bcbc7 100755 (executable)
@@ -9,9 +9,17 @@ boot() {
                echo "*/5 * * * *       killall -HUP dnsmasq" >> /etc/crontabs/root
        }
 
-#      grep -q '/usr/sbin/ff_olsr_test_gw' /etc/crontabs/root || {
-#              echo "* * * * *         /usr/sbin/ff_olsr_test_gw" >> /etc/crontabs/root
-#      }
+       grep -q '/usr/sbin/ff_olsr_test_gw' /etc/crontabs/root || {
+               echo "* * * * *         /usr/sbin/ff_olsr_test_gw" >> /etc/crontabs/root
+       }
+
+       grep -q '/usr/sbin/ff_olsr_watchdog' /etc/crontabs/root || {
+               echo "*/5 * * * *       /usr/sbin/ff_olsr_watchdog" >> /etc/crontabs/root
+       }
+
+       grep -q '/usr/sbin/ff_rdate' /etc/crontabs/root || {
+               echo "0 */4 * * *       /usr/sbin/ff_rdate >> /etc/crontabs/root
+       }
 
        [ -f /etc/rc.local ] && . /etc/rc.local
        [ -d /etc/rc.local.d ] && {
@@ -19,4 +27,6 @@ boot() {
                        test -f "$file" && . "$file"
                done
        }
+
+       ( /usr/sbin/ff_rdate; /etc/init.d/cron restart ) &
 }