nsbin/ping_pong.sh
Nico Schottelius d3c6e29902 Initial commit
2006-07-20 09:54:37 +02:00

11 lines
224 B
Bash

HOSTS="www.spiegel.de www.lernen.de www.isc.org B.ROOT-SERVERS.NET"
STATUS=offline
for myh in $HOSTS; do
ping -c1 $myh >/dev/null 2>&1 && STATUS=online
done
if [ "$STATUS" = offline ]; then
echo 'Offline.'`date`
fi