[mythtv-users] Multiple commercial flagging tasks causing Mythbackend to die
Ryan Steffes
rbsteffes at gmail.com
Mon Sep 17 15:52:55 UTC 2007
On 9/17/07, Doug Young <goofdad at gmail.com> wrote:
> On 9/17/07, A JM <vbtalent at gmail.com> wrote:
> > Since I'm not checking for the mythbackend PID ( BackendRunStatus=`ps -A |
> grep -c "mythbackend"`) is there a way to use the same KILL command with a
> generic "mythbackend" in it? In other words if you find "mythbackend", KILL
> it?
> >
>
> killall -9 mythbackend
>
> or
>
> ps -A | grep -c "mythbackend" | awk '{print $1}' | xargs kill -9
>
> the quoting on the last is very important, the first is much easier.
>
> --
> Doug
>
>
Incidentally, I modified my init.d/mythbackend script as follows:
stop() {
echo -n "Stopping ${MBE_PROG}: "
killproc ${MBE_LOCATION}${MBE_PROG}
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/${MBE_PROG}
echo -n "Stopping Mythtranscode"
killproc ${MBE_DIR}mythtranscode
RETVAL=$?
[ $RETVAL -eq 0 ]
echo
echo -n "Stopping Mythcommflag"
killproc ${MBE_DIR}mythcommflag
RETVAL=$?
[ $RETVAL -eq 0 ]
echo
return $RETVAL
}
restart() {
stop
[ -e /var/lock/subsys/${MBE_PROG} ] && rm -f
/var/lock/subsys/${MBE_PROG}
start
}
To handle the issue of restarting kicking off too many mythtranscode
and mythcommflag jobs, as well as the stale lock files not being
cleaned up.
More information about the mythtv-users
mailing list