>
>
> [-------------------------------------------------------------------------------------]
> #!/bin/sh
>
> while [ "1" = "1" ]; then
> do
> sleep 15
> echo "Checking for mplayer..."
> stat=`pgrep mplayer`
> if [ "$stat" = "" ]; then
> shutdown -hP now
> fi
> done
>
> [-------------------------------------------------------------------------------------]
>
> Above script looks good, but I like to propose my modifications in that.
#!/bin/sh
echo "Checking for mplayer..."
stat=`pgrep mplayer`
if [ "$stat" = "" ]; then
shutdown -hP now
fi
Love to save the above script as the watchdog.sh. Instead of going for a
infinite loop with sleep command, I would add script along with watch as
$watch ./watchdog.sh
--
Ravi Jaya
Mobile: +91 97909 16181
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc