[mythtv-users] Slightly OT: can't get power button script to restart front end (From Jarod's guide)

Kevin Kuphal kuphal at dls.net
Thu Nov 3 12:03:02 EST 2005

Jon Kunze wrote:

> 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:


For reference, this is the script I use to do this:

MYTHEXISTS=`/bin/ps -e | grep mythfrontend | grep -v grep | awk '{print 

if [ "$MYTHEXISTS" != "" ]; then
        for MYTHPROCESS in `/bin/ps -e | grep mythfrontend | grep -v 
grep | awk '{print $1}'`
                echo $MYTHPROCESS;
                kill -9 $MYTHPROCESS;

Works great


More information about the mythtv-users mailing list