X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Ffreifunk%2Froot%2Fetc%2Finit.d%2Ffreifunk;h=273f83285600103d9ad25cb145c8ed4cf88fc410;hp=13dfde7f682024f60e3602fef240224d59ac82c7;hb=a3c4c0b87b856d602f961344b4a43d8603f9db3c;hpb=ff57f4f870639b5ea8064d789d222193f874112b diff --git a/modules/freifunk/root/etc/init.d/freifunk b/modules/freifunk/root/etc/init.d/freifunk index 13dfde7f6..273f83285 100755 --- a/modules/freifunk/root/etc/init.d/freifunk +++ b/modules/freifunk/root/etc/init.d/freifunk @@ -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 } @@ -17,12 +19,19 @@ boot() { echo "*/5 * * * * /usr/sbin/ff_olsr_watchdog" >> /etc/crontabs/root } - [ -f /etc/rc.local ] && . /etc/rc.local + grep -q '/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 + } + [ -d /etc/rc.local.d ] && { for file in /etc/rc.local.d/*; do test -f "$file" && . "$file" done } - /etc/init.d/cron restart + ( /usr/sbin/ff_rdate; /etc/init.d/cron restart ) & }