contrib/package: make luci-freifunk-community dependant on olsrd-luci-mod-watchdog
[project/luci.git] / modules / freifunk / root / etc / init.d / freifunk
1 #!/bin/sh /etc/rc.common
2 # Freifunk Init
3 # $Id$
4
5 START=99
6
7 boot() {
8         grep -q 'killall -HUP dnsmasq' /etc/crontabs/root || {
9                 echo "*/5 * * * *       killall -HUP dnsmasq" >> /etc/crontabs/root
10         }
11
12         grep -q '/usr/sbin/ff_olsr_test_gw' /etc/crontabs/root || {
13                 echo "* * * * *         /usr/sbin/ff_olsr_test_gw" >> /etc/crontabs/root
14         }
15
16         grep -q '/usr/sbin/ff_olsr_watchdog' /etc/crontabs/root || {
17                 echo "*/5 * * * *       /usr/sbin/ff_olsr_watchdog" >> /etc/crontabs/root
18         }
19
20         [ -f /etc/rc.local ] && . /etc/rc.local
21         [ -d /etc/rc.local.d ] && {
22                 for file in /etc/rc.local.d/*; do
23                         test -f "$file" && . "$file"
24                 done
25         }
26
27         killall -HUP crond 2>/dev/null || /etc/init.d/cron start
28 }