luci-0.8: merge init script changes from r4530
This commit is contained in:
parent
5723346226
commit
0ff2553ea2
1 changed files with 11 additions and 6 deletions
|
@ -6,15 +6,20 @@ BIN=/usr/sbin/ffwatchd
|
||||||
|
|
||||||
boot()
|
boot()
|
||||||
{
|
{
|
||||||
if ! grep -q "$BIN" /etc/crontabs/root 2>/dev/null; then
|
# If watchdog service is enabled, install cronjob, create device node and start daemon
|
||||||
echo "* * * * * $BIN running || /etc/init.d/freifunk-watchdog restart" >> /etc/crontabs/root
|
if /etc/init.d/freifunk-watchdog enabled 2>/dev/null; then
|
||||||
fi
|
if ! grep -q "$BIN" /etc/crontabs/root 2>/dev/null; then
|
||||||
|
echo "* * * * * $BIN running || /etc/init.d/freifunk-watchdog restart" >> /etc/crontabs/root
|
||||||
|
fi
|
||||||
|
|
||||||
if lsmod | grep -q softdog; then
|
|
||||||
mknod /dev/watchdog c 10 130
|
mknod /dev/watchdog c 10 130
|
||||||
fi
|
|
||||||
|
|
||||||
start
|
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()
|
||||||
|
|
Loading…
Reference in a new issue