[mythtv-users] Keeping backend running.

Mark Hutchinson mark at onnow.net
Thu Apr 10 13:54:17 UTC 2008


On 10-Apr-08, at 7:19 AM, Mike Dent wrote:

> Hi,
> it seems my backend dies now and again for no obvious reason. What  
> scripts or methods are people using check it is running and
> restart it if its died?
> I'm running Ubuntu 7.10 with mythtv 0.21 , combined be/fe.
>
> Thanks
> Mike
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
I run this every 5 minutes

#!/bin/sh
PROCESS=`ps aux | grep \/usr\/bin\/mythbackend | grep -v grep`
if [ "$PROCESS" = "" ]; then
/etc/init.d/mythbackend restart
DATE=`date`
echo "$DATE restarted mythbackend" >> /var/log/backend-restart.log
mail -s "$DATE restarted mythbackend" you at youremail.com < /var/log/ 
backend-restart.log
fi


More information about the mythtv-users mailing list