replace ping by nc to circumvent errors when ICMP requests are blocked on a remote host

This commit is contained in:
2015-01-08 23:08:09 +01:00
parent 873499a733
commit a951875c8f
+5 -1
View File
@@ -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 $?)
}