[Ilugc] My deceptively simple shutdown script after music playsq

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Wed May 12 14:44:18 2010

On Wed, May 12, 2010 at 1:37 PM, Ravi Jaya


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,

I have not used watchdog or watch anytime.

Thanks.

That should also work.

Ah I later realized that you are talking about the watch command which
 I learnt recently. That is nice too.

You are just calling the script watchdog.;)

Okay.

-Girish


-- 
Gayatri Hitech
web: http://gayatri-hitech.com

SpamCheetah Spam filter:
http://spam-cheetah.com

Other related posts: