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.

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

Reply via email to