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:
IndeecFOX 2025-11-03 12:49:27 +03:00 committed by GitHub
parent 7a994d7d28
commit 3632911c18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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