]> Sergey Matveev's repositories - sgmon.git/blob - helper/ping
Initial commit
[sgmon.git] / helper / ping
1 #!/bin/sh -e
2
3 proto=$1
4 shift
5 [ "$proto" = "6" ] || proto=""
6 if ping${proto} -c 1 $@ > state/ping-out ; then
7     tail -1 < state/ping-out
8 else
9     cat state/ping-out
10     exit 1
11 fi