replace ping by nc to circumvent errors when ICMP requests are blocked on a remote host
This commit is contained in:
+5
-1
@@ -31,7 +31,11 @@ function mailsend {
|
||||
}
|
||||
|
||||
function pingtest {
|
||||
ping -c3 -W3 -q $1 >> /dev/null
|
||||
#ping -c3 -W3 -q $1 >> /dev/null
|
||||
#timeout 5 bash -c 'echo "ping" > /dev/tcp/$1/80'; echo $?
|
||||
|
||||
nc -z -w3 $1 80 > /dev/null
|
||||
|
||||
PSTATUS=$(echo $?)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user