mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-12 08:21:40 +00:00
~脚本进行大量拆分和优化
This commit is contained in:
11
scripts/starts/check_network.sh
Normal file
11
scripts/starts/check_network.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Juewuy
|
||||
|
||||
network_check() { #检查是否联网
|
||||
for text in 223.5.5.5 1.2.4.8 dns.alidns.com doh.pub; do
|
||||
ping -c 3 $text >/dev/null 2>&1 && return 0
|
||||
sleep 5
|
||||
done
|
||||
logger "当前设备无法连接网络,已停止启动!" 33
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user