Hello,

I have been struggling with this issue for a couple of weeks, with no resolution.  A search of this forum finds similar issues surrounding vnc, but none that seem to be like mine. 

I am using an lirc script to start/stop mythfrontend.  The idea is that the remote control power button will kill off the frontend if it is running, and to restart the frontend if it is not running.  Problem is, when I restart the frontend, I sometimes (but not always) get two instances of the frontend, and this causes conflicts with sound, among other things.  It's easy enough for me to shell in to the box and kill one of them off, but my wife will not be too thrilled about doing that for herself, so I think I better find a better solution.

Here is my script:

[EMAIL PROTECTED] ~]$ more /usr/local/bin/mythpowerbutton.sh
#!/bin/bash
PROG=mythfrontend
OPTION=`--verbose`
STATUS=`ps -e | grep $PROG | grep -v grep | wc -l | awk '{print $1}'`
if [ $STATUS -eq 0 ]
then
   ( $PROG $OPTION >> /var/log/mythtv/front.log & )
else
   killall $PROG
fi
exit 0
[EMAIL PROTECTED] ~]$


This script is invoked from the .lircrc config file as so:

# Power Off/Exit
begin
prog = irexec
button = OFF
config = /usr/local/bin/mythpowerbutton.sh
end

Can anyone offer a suggestion to how I can solve this annoyance?
Larry
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to