Hello,<br>
<br>
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. <br>
<br>
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.<br>
<br>
Here is my script:<br>
<br>
[mythtv@localhost ~]$ more /usr/local/bin/mythpowerbutton.sh<br>
#!/bin/bash<br>
PROG=mythfrontend<br>
OPTION=`--verbose`<br>
STATUS=`ps -e | grep $PROG | grep -v grep | wc -l | awk '{print $1}'`<br>
if [ $STATUS -eq 0 ]<br>
then<br>
( $PROG $OPTION >> /var/log/mythtv/front.log & )<br>
else<br>
killall $PROG<br>
fi<br>
exit 0<br>
[mythtv@localhost ~]$<br>
<br>
<br>
This script is invoked from the .lircrc config file as so:<br>
<br>
# Power Off/Exit<br>
begin<br>
prog = irexec<br>
button = OFF<br>
config = /usr/local/bin/mythpowerbutton.sh<br>
end<br>
<br>
Can anyone offer a suggestion to how I can solve this annoyance?<br>
Larry<br>