projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
contrib/package/freifunk-watchdog: nuke cronjob if wd is disabled and stop is invoked
[project/luci.git]
/
contrib
/
package
/
freifunk-watchdog
/
files
/
freifunk-watchdog.init
diff --git
a/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
b/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
index
1f87bf7
..
d6ede09
100755
(executable)
--- 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
}