Re: mythbackend starting before mySQLd
Paul Wilson <[email protected]>
| Newsgroups | gmane.linux.redhat.rpm.atrpms.general |
|---|---|
| Message-ID | <CAP6c-yz9RyL8SjVQirybmT+ovWscA-Zkrpsdex12X0iYNXw3SA@mail.gmail.com> |
On Sun, Sep 2, 2012 at 2:17 AM, Christopher X. Candreva <[email protected]>wrote: > On Fri, 31 Aug 2012, The Walters wrote: > > > I ran into this before and found where someone said just include a delay > in the mythbackend startup script (edit > > /etc/rc.d/init.d/mythbackend and change/add: sleep ## <-- number of > seconds 5 - 10 works), that has been working for me. > > > > # daemon --user mythtv $binary $OPTIONS > > daemon sleep 10; $binary $OPTIONS > > Hope this helps. > > Rather than try to find the best sleep value, I added this bit of code > before mythbackend actually starts: > #Wait for mysql to start, up to 60 seconds > > for i in {1..60} > do > if mysql -u mythtv -pPassword </dev/null >/dev/null 2>&1 ; then > break > fi > sleep 1s; > done > > > So it checks once a second to see if it can connect, 60 times. It will wait > up to a minute, then continue anyway -- and mythbackend will fail, but if > it > isn't up after a minute something is wrong. > > > ========================================================== > Chris Candreva -- [email protected] -- (914) 948-3162 > WestNet Internet Services of Westchester > http://www.westnet.com/ > > _______________________________________________ > atrpms-users mailing list > [email protected] > http://lists.atrpms.net/mailman/listinfo/atrpms-users > Note the systemd now looks after the pre-req of MySQLd, the latest issue was some DVB devices taking sometime to initialized but the sleep / delay seems to have worked for me. _______________________________________________ atrpms-users mailing list [email protected] http://lists.atrpms.net/mailman/listinfo/atrpms-users