Browse Source

add test ip when boot

rufengsuixing 5 năm trước cách đây
mục cha
commit
ebfac843ef
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      root/usr/share/AdGuardHome/waitnet.sh

+ 10 - 0
root/usr/share/AdGuardHome/waitnet.sh

@@ -8,12 +8,22 @@ do
 		/etc/init.d/AdGuardHome 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 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 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 reload
+		break
+	fi
 	sleep 5
 	count=$((count+1))
 	if [ $count > 18 ]; then