[mythtv-users] Multiple (duplicate) instances of mythfrontend
Colin Smillie
csmillie at gmail.com
Sun May 8 20:47:56 UTC 2005
On 5/8/05, Larry K <lunchtimelarry at gmail.com> wrote:
> 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
Are you sure your getting 2 new instances or is the old instance not
being killed off? I had a similar problem where the frontend wouldn't
die without a kill -9 instruction. I modified my script to include
this. I also expanded it to cover mplayer and xine ( included below
), there might be better implementations...
Colin
#!/bin/bash
#Kill Xine
PROG=xine
STATUS=`ps -e | grep -w $PROG | grep -v grep | wc -l | awk '{print $1}'`
if [ $STATUS -eq 0 ]
then
echo "No Xine Running"
else
echo "Killing Xine"
killall $PROG
killall -9 $PROG
fi
#Kill Xine
PROG=mplayer
STATUS=`ps -e | grep -w $PROG | grep -v grep | wc -l | awk '{print $1}'`
if [ $STATUS -eq 0 ]
then
echo "No Mplayer Running"
else
echo "Killing Mplayer"
killall $PROG
killall -9 $PROG
fi
#Kill or Start MythFrontEnd
PROG=mythfrontend
STATUS=`ps -e | grep $PROG | grep -v grep | wc -l | awk '{print $1}'`
if [ $STATUS -eq 0 ]
then
( $PROG & )
else
killall $PROG
killall -9 $PROG
fi
exit 0
More information about the mythtv-users
mailing list