summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/freifunk-watchdog
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-05-16 17:30:01 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-05-16 17:30:01 +0000
commitdc4b478e7b96b2bc0435643e95472a9004274e50 (patch)
tree4c8fc29ba24c31896532e938f34d59f378a2346e /contrib/package/freifunk-watchdog
parent07b6a704c4e121d603307bcf5d036651e23d3532 (diff)
contrib/package/freifunk-watchdog: nuke cronjob if wd is disabled and stop is invoked
Diffstat (limited to 'contrib/package/freifunk-watchdog')
-rwxr-xr-xcontrib/package/freifunk-watchdog/files/freifunk-watchdog.init6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init b/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
index 1f87bf744..d6ede09b6 100755
--- a/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
+++ b/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
@@ -30,4 +30,10 @@ start()
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
}