Update serv00keep.sh
This commit is contained in:
+3
-4
@@ -49,10 +49,9 @@ read_ip(){
|
||||
nb=$(echo "$HOSTNAME" | cut -d '.' -f 1 | tr -d 's')
|
||||
ym=("$HOSTNAME" "cache$nb.serv00.com" "web$nb.serv00.com")
|
||||
rm -rf ip.txt hy2ip.txt
|
||||
for ip in "${ym[@]}"; do
|
||||
dig @8.8.8.8 +time=5 +short $ip >> hy2ip.txt
|
||||
sleep 1
|
||||
done
|
||||
dig @8.8.8.8 +time=5 +short "web$nb.serv00.com" >> hy2ip.txt
|
||||
dig @8.8.8.8 +time=5 +short "$HOSTNAME" >> hy2ip.txt
|
||||
dig @8.8.8.8 +time=5 +short "cache$nb.serv00.com" >> hy2ip.txt
|
||||
for host in "${ym[@]}"; do
|
||||
response=$(curl -sL --connect-timeout 5 --max-time 7 "https://ss.serv0.us.kg/api/getip?host=$host")
|
||||
if [[ "$response" =~ ^$|unknown|not|error ]]; then
|
||||
|
||||
Reference in New Issue
Block a user