[asterisk-users] Starting Asterisk on Ubuntu 7.04

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat May 5 09:49:03 MST 2007


On Sat, May 05, 2007 at 06:23:43PM +0200, Remco Post wrote:
> Mark Coccimiglio wrote:
> > Tzafrir;
> >    Actually I have found this config to work really well.  I prefer to
> > use a script run from inittab but Ubuntu doesn't work like Redhat or
> > BSD.  On a production box keeping asterisk up and running is "THE TOP"
> > priority.  If you would rather check every five minutes then replace the
> > first "*" with "*/5".  I will address your points as it seems that you
> > haven't really thought about this.
> > 
> > 1)  In a production environment you should NOT be messing with the
> > config.  That's what test hardware is for.
> > 
> > 2) The answer to this question is: "crontab -e" its really not that
> > hard.  I'm not running asterisk every minute.  I'm looking to see if
> > asterisk is running and then act accordingly
> > 
> > 3) If asterisk fails believe me a full mailbox is the least of my
> > worries.  As for full logs I'd rather have more information...."grep &
> > awk" are your friends.
> > 
> > I prefer to keep things as simple as possible.  Sure scripts like
> > "safe_asterisk" are nice and do some
> > really neat things but lets face it how often do you actually sit at the
> > console of your asterisk box.  My
> > main PBX is located about 7 feet from my office desk and I still mostly
> > use ssh (not even telnet) to get
> > into the box.
> 
> at least on ubuntu 6.10 safe_asterisk requires one simple fix, not
> really a headbreaker (something with output redirection). 

Bashism? 

The rule in Debian is that a bourne shell script (#!/bin/sh) should not
use bash-specific features, such as &> . If it does, it should
explicitly ask for bash: '#!/bin/bash'

> You could
> actually edit the script to not start a console if you dont' want it to
> (say for security reasons).

Could you please elaborate?

I believe that this would wreck the error handling in that script.

> 
> If you wanted to start asterisk and keep monitoring it, that is what
> init is for. I don't know about ubuntu startup, but traditional sysV
> init would simply restart a process if it ever quits (respawn). My bet
> is that startup can do the same somehow, this is a far better way to
> keep * up....

But this means editing /etc/inittab every time you actually want to stop
asterisk.

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-users mailing list