On Mon, Nov 21, 2005 at 07:50:59PM -0800, cardboil wrote:
> I'd like to write a little script and attach it to my one of my
> remote control keys. However, I only want the commands to execute
> when mythfrontend is NOT running. Can someone help me write the IF
> statement that will check whether mythfrontend is running or not?
> Thank you!

        MYTHFRONTEND_PID=`pgrep -u mythuser mythfrontend`
        if [ -z "$MYTHFRONTEND_PID" ]; then
                # mythfrontend is not running
                ...
        else
                # mythfrontend is running
        fi

--Rob

Attachment: signature.asc
Description: Digital signature

_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to