mirror of
https://github.com/IndeecFOX/zapret4rocket.git
synced 2026-07-09 15:59:59 +00:00
Copy to /jffs/scripts/wan_event
curl -L -o /jffs/scripts/wan_event/zapret_up https://raw.githubusercontent.com/IndeecFOX/zapret4rocket/master/merlin_wan_restart_zapret.sh
This commit is contained in:
parent
7a994d7d28
commit
3632911c18
1 changed files with 14 additions and 0 deletions
14
merlin_wan_restart_zapret.sh
Normal file
14
merlin_wan_restart_zapret.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
wan_logger(){
|
||||
echo "WAN Zapret: $@"|/usr/bin/logger -s
|
||||
}
|
||||
WAN_STATE=$2
|
||||
if [ $WAN_STATE = "connected" ]
|
||||
then
|
||||
wan_logger "Waiting 5000ms after connected"
|
||||
sleep 5
|
||||
wan_logger "Restarting zapret"
|
||||
/opt/zapret/init.d/sysv/zapret restart
|
||||
wan_logger "Zapret restarted"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue