modules/freifunk: implement /etc/rc.local, install dnsmasq sighup cronjob on boot
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Jan 2009 20:14:49 +0000 (20:14 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Jan 2009 20:14:49 +0000 (20:14 +0000)
modules/freifunk/ipkg/postinst [new file with mode: 0755]
modules/freifunk/root/etc/init.d/freifunk [new file with mode: 0755]
modules/freifunk/root/etc/rc.local [new file with mode: 0644]

diff --git a/modules/freifunk/ipkg/postinst b/modules/freifunk/ipkg/postinst
new file mode 100755 (executable)
index 0000000..90e28ef
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ -n "${IPKG_INSTROOT}" ] || {
+       /etc/init.d/freifunk enabled || /etc/init.d/freifunk enable
+}
diff --git a/modules/freifunk/root/etc/init.d/freifunk b/modules/freifunk/root/etc/init.d/freifunk
new file mode 100755 (executable)
index 0000000..b7a1f90
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh /etc/rc.common
+# Freifunk Init
+# $Id$
+
+START=99
+
+boot() {
+       echo "*/5 * * * *       killall -HUP dnsmasq" >> /etc/crontabs/root
+
+       [ -f /etc/rc.local ] && . /etc/rc.local
+}
diff --git a/modules/freifunk/root/etc/rc.local b/modules/freifunk/root/etc/rc.local
new file mode 100644 (file)
index 0000000..58e44e4
--- /dev/null
@@ -0,0 +1,2 @@
+# /etc/rc.local
+# Only executed on boot, put your custom startup commands here