1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2023-01-18 21:21:55 +08:00
parent 6b7f0b4dba
commit fd8b7384d5
104 changed files with 13356 additions and 31 deletions

View file

@ -0,0 +1,35 @@
#!/bin/sh
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
count=0
while :
do
ping -c 1 -W 1 -q www.baidu.com 1>/dev/null 2>&1
if [ "$?" == "0" ]; then
/etc/init.d/AdGuardHome force_reload
break
fi
ping -c 1 -W 1 -q 202.108.22.5 1>/dev/null 2>&1
if [ "$?" == "0" ]; then
/etc/init.d/AdGuardHome force_reload
break
fi
sleep 5
ping -c 1 -W 1 -q www.google.com 1>/dev/null 2>&1
if [ "$?" == "0" ]; then
/etc/init.d/AdGuardHome force_reload
break
fi
ping -c 1 -W 1 -q 8.8.8.8 1>/dev/null 2>&1
if [ "$?" == "0" ]; then
/etc/init.d/AdGuardHome force_reload
break
fi
sleep 5
count=$((count+1))
if [ $count -gt 18 ]; then
/etc/init.d/AdGuardHome force_reload
break
fi
done
return 0