Thanks for this, it's a very nice, well argued piece. All the better when it comes from someone who clearly "knows" asterisk.
No worries! I've also posted it on Digium's Asterisk forum:
http://forums.digium.com/viewtopic.php?p=21585Now... Something a little worrying that i noticed today when i rebooted my server. During the bootup process, when all the services are scrolling up the screen with
[ok] on the right hand side, it gets to Asterisk and stops. No
[ok], no nothing.
Switching to another virtual terminal, i did
asterisk -r and found Asterisk was running. It had obviously failed to fork and become a daemon from the rc script. I killed it and restarted it with
nice -20 asterisk >/dev/null 2>&1 &which puts it in the background whether it wants to or not!
It was just lucky i was booting with a monitor that particular time, as i normally wouldn't be.
I'm wondering if it's something in my configs, because it won't fork and background on my laptop, either - and hasn't been doing so for a while. If it is, i can't begin to imagine what.
Anyway, it could be a good idea not to trust Asterisk to background itself in the rc script and, instead, to use something similar to what i use. Because if it doesn't background, the rc script never exits and the remaining services never get started.