[mythtv-users] Slightly OT: can't get power button script to
restart front end (From Jarod's guide)
Jon Kunze
jon99ut at gmail.com
Wed Nov 2 18:26:09 EST 2005
When I try to run irexec with the mythpowerbutton.sh script, I get this:
# irexec /usr/local/bin/mythpowerbutton.sh
irexec: bad file format, /usr/local/bin/mythpowerbutton.sh:2
I looked through the script file, and I can't seem to find any typos, so I
thought I'd ask for a second opinion. My script file looks like this:
#!/bin/bash
PROG=mythfrontend
STATUS=`ps -e | grep $PROG | grep -v grep | wc -l | awk '{print $1}'`
if [ `echo $DISPLAY | grep -c ":0"` -ge 1 ]
then
if [ $STATUS -eq 0 ]
then
( $PROG & )
else
killall $PROG
fi
fi
exit 0
Any ideas would be appreciated. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20051102/d8d84ad8/attachment.htm
More information about the mythtv-users
mailing list