diff options
author | Manuel Munz <freifunk@somakoma.de> | 2011-09-28 00:20:56 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2011-09-28 00:20:56 +0000 |
commit | c3a028c76c294c0578b0449d75f9aeaad209c8d1 (patch) | |
tree | da549085750d64091f3bc43992cf1c8417edd20c /contrib/package/freifunk-common/files/etc/init.d | |
parent | 876b191b20a01926657e4d3c618fd2f029f45f4d (diff) |
modules/freifunk: Move profiles and common files into seperate packages, this will enable us to build freifunk images without luci.
Diffstat (limited to 'contrib/package/freifunk-common/files/etc/init.d')
-rwxr-xr-x | contrib/package/freifunk-common/files/etc/init.d/freifunk | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/package/freifunk-common/files/etc/init.d/freifunk b/contrib/package/freifunk-common/files/etc/init.d/freifunk new file mode 100755 index 0000000000..5ffec43e83 --- /dev/null +++ b/contrib/package/freifunk-common/files/etc/init.d/freifunk @@ -0,0 +1,29 @@ +#!/bin/sh /etc/rc.common +# Freifunk Init +# $Id$ + +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 + } + + 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 + } + + [ -d /etc/rc.local.d ] && { + for file in /etc/rc.local.d/*; do + test -f "$file" && . "$file" + done + } + + ( sleep 40; /usr/sbin/ff_rdate; /etc/init.d/cron restart ) & +} |