From c3a028c76c294c0578b0449d75f9aeaad209c8d1 Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Wed, 28 Sep 2011 00:20:56 +0000 Subject: modules/freifunk: Move profiles and common files into seperate packages, this will enable us to build freifunk images without luci. --- .../freifunk-common/files/etc/init.d/freifunk | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 contrib/package/freifunk-common/files/etc/init.d/freifunk (limited to 'contrib/package/freifunk-common/files/etc/init.d') 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 ) & +} -- cgit v1.2.3