modules/freifunk: implement map update for GlobalMap
[project/luci.git] / modules / freifunk / root / etc / init.d / freifunk
index 79bcbc7..3a668b1 100755 (executable)
@@ -5,6 +5,8 @@
 START=99
 
 boot() {
+       test -f /etc/crontabs/root || touch /etc/crontabs/root
+
        grep -q 'killall -HUP dnsmasq' /etc/crontabs/root || {
                echo "*/5 * * * *       killall -HUP dnsmasq" >> /etc/crontabs/root
        }
@@ -18,7 +20,11 @@ boot() {
        }
 
        grep -q '/usr/sbin/ff_rdate' /etc/crontabs/root || {
-               echo "0 */4 * * *       /usr/sbin/ff_rdate >> /etc/crontabs/root
+               echo "0 */4 * * *       /usr/sbin/ff_rdate" >> /etc/crontabs/root
+       }
+
+       grep -q '/usr/sbin/ff_mapupdate' /etc/crontabs/root || {
+               echo "17 * * * *        /usr/sbin/ff_mapupdate >> /etc/crontabs/root
        }
 
        [ -f /etc/rc.local ] && . /etc/rc.local