There's a bit of a writeup at http://www.mythtv.info/moin.cgi/StatusMonitoringHowTo


[EMAIL PROTECTED] wrote:

David,

Thanks.
So as I understand it create a new line in /etc/inittab, simple as that.


yes - that could work.
However, it's not the best way to do it - the backend may start before mysql - or your frontend may start before the backend does.
For this reason...


 What confused me was the various other scripts in other directories,
/etc/rc.d/rc3.d , etc which claim to start mythbackend.

...the rc3.d and rc5.d scripts are numbered to start in a certain order to ensure that mysql starts before the backend which starts before the frontend etc.

As I now
understand it these got created when I did "chkconfig mythbackend on"
command to autostart the backend.


yes

Presumably this means I need to "chkconfig mythbackend off" to get rid
of these when I edit the inittab file? yes?


it's one approach - but using a monitor like monit or daemontools is better as this lets things start up normally and then just re-starts them if they die.
Now *that* you can start from the inittab (as I said earlier).
There is actually a slight gotcha (I don't know if this applies to daemontools too) : if the monitor is started *before* the backend service is fully up and running then it can detect a failure and kill and restart the backend needlessly. For this reason I've submitted a patch to the Debian monit maintainer that helps fix this.


Sorry, being a bit slow, but I never seem to get the whole picure from
the man pages.


's OK

As long as people do read them, think and *then* ask questions I don't mind at all ;)

So if I were you I'd leave the chkconfig stuff set to 'on' and pick one of monit or daemontools.
Then follow the instructions at the wiki.
Don't do init to start until you can do an /etc/init.d/mythbackend stop
and have it restart


David

cheers,
Dave



well,
 man init
and
 man inittab
are good :)

You say:



My /etc/inittab file calls up a script (
/etc/rc.d/rc3.d/S86mythbackend ) to start the backend.


surely that's not on a line by itself?
My reading of the manpage suggests that that would be an error...


You would just edit the file, and add the line I mention below pretty much anywhere.

David
PS, notice it has respawn in the line itself - that's what I meant...
Let me know if you have problems.

Dave Ansell wrote:



David,

   Sorry, but I am not that familiar with the workings of inittab.
   My /etc/inittab file calls up a script   (
/etc/rc.d/rc3.d/S86mythbackend )  to start the backend.
   Where exactly do I put the respawn option?




Fair question :)

The answer is 'init' via 'inittab'

use the respawn option and it will...

moni:235:respawn:/usr/sbin/monit

(however make sure you get the config right first!)

If init crashes then you've got problems...


David


_______________________________________________ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users





_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users




_______________________________________________ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to