Hi all,
Maybe the fix would be to include mysql under 'Should-Start' (and 'Should-Stop') in the LSB
header. That way mysql will be started if it is present, but not prevent Kamailio from starting if it is not.
There is actually already a commented out Should-Start and Should-Stop in /etc/init.d/kamailio - it would just need uncommenting and moving up into the header.
I am sticking with Required-Start as I have defined WITH_MYSQL, WITH_AUTH, wtc in my config file.
I found these definitions of Should-Start and Should-Stop at http://wiki.debian.org/LSBInitScripts:
Should-Start: boot_facility_1 [boot_facility_2...] defines the facilities that if present should start before the service provided by the script. Nevertheless, the script can still start if the listed facilities
are missing. This allows for weak dependencies which do not cause the service to
fail if a facility is not available. Consider using virtual facility names as described below if adequate.
Should-Stop: boot_facility_1 [boot_facility_2...] defines the facilities that if present should be stopped after this service. Normally you would include here the same facilities as those used with the Should-Start keyword.
Regards, Rick
----- Original Message ---- From: Henning Westerholt henning.westerholt@1und1.de To: sr-users@lists.sip-router.org Cc: Klaus Darilion klaus.mailinglists@pernau.at; "miconda@gmail.com" miconda@gmail.com; Rick Aldred eazilyled@yahoo.co.uk Sent: Wed, 13 April, 2011 10:30:45 Subject: Re: [SR-Users] Kamailio service not starting on reboot when using mysql
database
On Wednesday 13 April 2011, Klaus Darilion wrote:
Maybe someone that knows the right format can send a patch to get the init.d script to the proper LSB header - even better, commit the fix if someone with git write access knows the format.
I think the problem is not the proper format, but when to add dependencies. For example just because mysql is installed does not mean that mysql is really used by Kamailio.
Hi Klaus,
yes - for example on a stateless loadbalancer. If we add this to the init script, we need to think about making mysql a runtime requirement also from the packaging level.
Cheers,
Henning