This commit is contained in:
klever1988
2020-03-24 16:40:06 +08:00
parent 6ac1dd1fe2
commit ac1518685c
2 changed files with 0 additions and 0 deletions

14
scripts/check_wan4.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
source /lib/functions/network.sh
network_find_wan NET_IF
network_get_gateway NET_GW "${NET_IF}"
r=`ping -c1 "${NET_GW}"`
r=`echo $r | grep Permitted`
while true; do
if [[ "$r" != "" ]] ;then
/etc/init.d/firewall restart
fi
sleep 2
done