From: Jo-Philipp Wich Date: Sat, 16 May 2009 17:30:01 +0000 (+0000) Subject: contrib/package/freifunk-watchdog: nuke cronjob if wd is disabled and stop is invoked X-Git-Tag: 0.9.0~447 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dc4b478e7b96b2bc0435643e95472a9004274e50;p=oweals%2Fluci.git contrib/package/freifunk-watchdog: nuke cronjob if wd is disabled and stop is invoked --- 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 }