blob: 1174e1acc0850ad6c746393b4c145deb3b9e63e1 [file] [log] [blame]
#!/bin/sh
IP=$1
[ -x /usr/sbin/fping ] && {
fping -t 100 -c 1 $IP &> /dev/null && echo 1 || echo 0
} || {
ping -w 1 -c 1 $IP &> /dev/null && echo 1 || echo 0
}