Update serv00.sh

This commit is contained in:
甬哥侃侃侃ygkkk
2025-02-19 09:08:43 +08:00
committed by GitHub
parent 20bcdff20f
commit 7af5562d91
+3 -4
View File
@@ -1322,10 +1322,9 @@ menu() {
nb=$(echo "$HOSTNAME" | cut -d '.' -f 1 | tr -d 's') nb=$(echo "$HOSTNAME" | cut -d '.' -f 1 | tr -d 's')
ym=("$HOSTNAME" "cache$nb.serv00.com" "web$nb.serv00.com") ym=("$HOSTNAME" "cache$nb.serv00.com" "web$nb.serv00.com")
rm -rf $WORKDIR/ip.txt $WORKDIR/hy2ip.txt rm -rf $WORKDIR/ip.txt $WORKDIR/hy2ip.txt
for ip in "${ym[@]}"; do dig @8.8.8.8 +time=5 +short "web$nb.serv00.com" >> $WORKDIR/hy2ip.txt
dig @8.8.8.8 +time=5 +short $ip >> $WORKDIR/hy2ip.txt dig @8.8.8.8 +time=5 +short "$HOSTNAME" >> $WORKDIR/hy2ip.txt
sleep 1 dig @8.8.8.8 +time=5 +short "cache$nb.serv00.com" >> $WORKDIR/hy2ip.txt
done
for host in "${ym[@]}"; do for host in "${ym[@]}"; do
response=$(curl -sL --connect-timeout 5 --max-time 7 "https://ss.serv0.us.kg/api/getip?host=$host") response=$(curl -sL --connect-timeout 5 --max-time 7 "https://ss.serv0.us.kg/api/getip?host=$host")
if [[ "$response" =~ ^$|unknown|not|error ]]; then if [[ "$response" =~ ^$|unknown|not|error ]]; then