Tema: check; ping host
Autorius: Rolkiz
Data: 2008-06-03 11:44:21
Sveiki,

galite priminti, tikrinu pastoviai ar gyvas remote hostas, ir reikia jei 
negyvas, rebootinti vietini. Galite pataisykite mane, bo visiskai 
susipainiojau!


=============
#!/bin/bash

host=192.168.0.88
#echo "Pinging $host ; Use ctl c to end the loop"

while : ; do

STATUS=`nmap -sP $host | grep -c "appears to be up"`
if [ $STATUS -eq 1 ];
then exit 0;
else reboot
fi

done

===================