Quoting Daniel Pocock (2014-03-27 13:15:24)
> Package: asterisk
> Version: 1:11.7.0~dfsg-1
> 
> The "stop" method in the init script contains these two lines:
> 
>          start-stop-daemon --stop --quiet --oknodo
> --retry=0/2/TERM/2/KILL/5 --exec $DAEMON
>          start-stop-daemon --stop --quiet --oknodo
> --retry=0/2/TERM/2/KILL/5 --exec $CANARY
> 
> If somebody is running multiple instances of Asterisk, this will kill 
> all of them even if they only meant to kill one of them
> 
> Would you consider removing these from the init script or could you 
> elaborate on why they are necessary?
> 
> The comments suggest that it is intended to kill any Asterisk CLI 
> processes - is it really necessary to do that in this way?  Shouldn't 
> the CLI gracefully disconnect/reconnect when the main Asterisk process 
> is killed/restarted?

I believe actually that this is an RC bug - Policy ยง9.3.2 says this:

> The `init.d' scripts must ensure that they will behave sensibly (i.e., 
> returning success and not starting multiple copies of a service) if 
> invoked with `start' when the service is already running, or with 
> `stop' when it isn't, and that they don't kill unfortunately-named 
> user processes.  The best way to achieve this is usually to use 
> `start-stop-daemon' with the `--oknodo' option.

I.e. init script *must* play nice with other processes with same name!


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply via email to