[mythtv-users] Restarting the backend from the frontend
Bill Omer
bill.omer at gmail.com
Thu Nov 8 20:45:03 UTC 2007
On Nov 8, 2007 3:17 PM, Steven Adeff <adeffs.mythtv at gmail.com> wrote:
> On Nov 3, 2007 1:22 AM, Rossco <rossco at whyza.net> wrote:
> > I recently installed monit
> >
> > it does exactly as I need after I configured it...it check for a running
> > mythtbackend process every 20 secs, and if mythtbackend crashes, monit will
> > restart it.
> >
> > max down time 40 secs
>
> lucky, I installed monit, and as far as i can tell its configured
> properly, it just doesn't want to restart mythbackend when it
> crashes...
>
I use this in a crontab running every minute. Short, sweet, and works.
#!/bin/bash
if ps auwfx | grep mythbackend | grep -v grep
then
echo "its up"
else
echo "its down ... "
#echo "Restarting mythbackend on `date`" | mail -s
"mythbackend failed" bill.omer at gmail.com
/etc/init.d/mythbackend restart
fi
More information about the mythtv-users
mailing list