Once upon a time Sunday 20 November 2005 8:39 pm, Matt Riddell wrote: > Eric Bishop wrote: > > Hi All, > > > > I am running Asterisk (1.0.9.) on CentOS 4 with CDR recording being > > output to MySQL. However whenever the system boots up after a reboot I > > am needing to manually restart Asterisk because MySQL is after Asterisk > > in the service startup sequence and I get > > > > ERROR[3367]: Failed to connect to mysql database cdr on localhost. > > > > Anyone know of a simple and elegant way to fix this? > > > > I'd prefer not to have to hack either MySQL or Asterisk init scripts > > If it's running using services, you could set MySQL to start on level 2 and > Asterisk on level 3. > > chkconfig --list umm. you obviously dont understand how the different run levels work. run level 2 has nothing to do with run level 3 the easiest way would be to put in /etc/rc.local /etc/init.d/asterisk restart then asterisk will be restarted very last thing before you get a login prompt. that is the only way to do it without changing the priorites in the init scripts to make sure asterisk starts later.
though on my setup my init scripts are set to run asterisk almost last and way after mysql has started. -- Dennis Gilmore, RHCE <dennis AT ausil DOT us> http://www.ausil.us
pgpFqyDCOtbRZ.pgp
Description: PGP signature
_______________________________________________ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
