mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-08 05:04:21 +08:00
💋 Sync 2026-10-04 04:16:09
This commit is contained in:
1 parent
f6b2df73ec
commit
f62992fd80
745 files changed
+212416
-1173
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
START=95
|
||||
STOP=05
|
||||
USE_PROCD=0
|
||||
|
||||
HP=/etc/hotplug.d/iface/99-quickactions-conntrack-flush
|
||||
CRON_LINE="* * * * * /usr/bin/wan-watchdog.sh"
|
||||
|
||||
start() {
|
||||
en=$(uci -q get quickactions.failover.enabled)
|
||||
[ -z "$en" ] && en=1
|
||||
if [ "$en" = "1" ]; then
|
||||
[ -f "$HP" ] && chmod 755 "$HP"
|
||||
(crontab -l 2>/dev/null | grep -v "wan-watchdog.sh"; echo "$CRON_LINE") | crontab -
|
||||
else
|
||||
[ -f "$HP" ] && chmod 644 "$HP"
|
||||
crontab -l 2>/dev/null | grep -v "wan-watchdog.sh" | crontab -
|
||||
fi
|
||||
/etc/init.d/cron restart
|
||||
}
|
||||
|
||||
stop() {
|
||||
crontab -l 2>/dev/null | grep -v "wan-watchdog.sh" | crontab -
|
||||
/etc/init.d/cron restart
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
Reference in new issue
Block a user