[mythtv-users] backend monitoring scripts?

Robert Creager Robert_Creager at LogicalChaos.org
Sat Dec 9 15:53:04 UTC 2006


Leo Kliger wrote:
> On Sun, 2006-11-26 at 09:56 -0400, Paul A Pick wrote:
>>> Do anyone have any scripts which monitor the backend?
>>> ie if it crashes  automatically restart and/or notify status
>>> etc...
>> ...
>>> Ideally something easy to configure would be good.
> 
> I wanted something like this myself but the sample script didn't work
> for me because I don't run mythweb.... so using it as a guide I have
> tried to write something that will work on any Linux box....

Try using /etc/inittab.  <man inittab> will give you some hints.  After 
updating the inittab file, execute <telinit q> or reboot the system.  My 
inittab has these entries, which will re-start any of the processes if 
they exit, and they are launched in run levels 2, 3, 4 & 5 (Ubuntu 
system).  Make sure the process does not run in the background, or it 
will be continually re-launched and cause all sorts of trouble.

#
# MythTV stuff
mtvb:2345:respawn:su - mythtv -c "mythbackend -l /var/log/mythtv/backend"
mtvl:2345:respawn:su - mythtv -c "mythlcdserver -l 
/var/log/mythtv/lcdserver"
mtvd:2345:respawn:su - mythtv -c "mtd -n"

Cheers,
Rob


More information about the mythtv-users mailing list