summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/package/freifunk-watchdog/files/freifunk-watchdog.init')
-rwxr-xr-xcontrib/package/freifunk-watchdog/files/freifunk-watchdog.init39
1 files changed, 0 insertions, 39 deletions
diff --git a/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init b/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
deleted file mode 100755
index d6ede09b61..0000000000
--- a/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-START=99
-PID=/var/run/ffwatchd.pid
-BIN=/usr/sbin/ffwatchd
-
-boot()
-{
- # If watchdog service is enabled, install cronjob, create device node and start daemon
- if /etc/init.d/freifunk-watchdog enabled 2>/dev/null; then
- if ! grep -q "$BIN" /etc/crontabs/root 2>/dev/null; then
- echo "* * * * * $BIN running || /etc/init.d/freifunk-watchdog restart" >> /etc/crontabs/root
- fi
-
- mknod /dev/watchdog c 10 130
-
- start
-
- # If service is disabled, find and remove related cronjob
- elif grep -q "$BIN" /etc/crontabs/root 2>/dev/null; then
- sed -i -e "\\'$BIN'd" /etc/crontabs/root
- fi
-}
-
-start()
-{
- start-stop-daemon -q -b -m -p $PID -x $BIN -S
-}
-
-stop()
-{
- start-stop-daemon -q -p $PID -x $BIN -K
-
- if ! /etc/init.d/freifunk-watchdog enabled; then
- if grep -q "$BIN" /etc/crontabs/root 2>/dev/null; then
- sed -i -e "\\'$BIN'd" /etc/crontabs/root
- fi
- fi
-}