[mythtv-users] Re : How to wait for mysqld to be ready before launching the backend?

Manu eallaud at gmail.com
Wed Jun 17 11:29:05 UTC 2009

Le 17/06/2009 02:37:55, Mark Wormgoor a écrit :
> Hi,
> > I have some issues with my setup: it is a combined BE/FE, and 1 out
> of 
> > 3 times mysql is read for connections much later than usual because
> it 
> > is busy recovering from a crash (this may be related to some issues 
> > with the intel driver crashing during the shutdown of my PC, but
> this 
> > is another story).
> > To make a long story short, I want to modify the backend startup
> script 
> > to make sure mysqld is ready for connection before launching the 
> BE.
> > Indeed for now the BE exits if it cant connect to the DB.
> Here's what I've used, which is an ugly hack, but works like a charm
> :). 
> Add the following to /etc/rc.d/rc.local:
> /usr/bin/at "now + 5 minutes" <<EOF
> /etc/init.d/mythbackend restart
> It isn't real-time, but will ensure your mythbackend is absolutely 
> the
> last thing to get started. You may loose 5 minutes on your recording, 
> but my machine rarely restarts (power loss + kernel upgrades only), 
> maybe once a month, probably less.
> Kind regards,
> Mark

Thanks Mark, but I will use Michael's solution because my BE actually 
shuts down itself quite frequently so it makes sense to have a good 
solution. Thx anyway.

More information about the mythtv-users mailing list