Update serv00.sh

This commit is contained in:
甬哥侃侃侃ygkkk
2025-03-07 15:25:30 +08:00
committed by GitHub
parent ccb396bf19
commit faec292c7f
+3 -1
View File
@@ -1355,7 +1355,7 @@ ym=("$HOSTNAME" "cache$nb.serv00.com" "web$nb.serv00.com")
rm -rf ip.txt
for host in "${ym[@]}"; do
response=$(curl -sL --connect-timeout 5 --max-time 7 "https://ss.fkj.pp.ua/api/getip?host=$host")
if [[ "$response" =~ ^$|unknown|not|error ]]; then
if [[ "$response" =~ (unknown|not|error) ]]; then
dig @8.8.8.8 +time=5 +short $host | sort -u >> $WORKDIR/ip.txt
sleep 1
else
@@ -1368,7 +1368,9 @@ fi
done <<< "$response"
fi
done
if [[ ! "$response" =~ (unknown|not|error) ]]; then
grep ':' $WORKDIR/ip.txt | sort -u -o $WORKDIR/ip.txt
fi
green "Serv00服务器名称:${snb}"
echo
green "当前可选择的IP如下:"