[asterisk-users] Starting Asterisk on Ubuntu 7.04

Mark Coccimiglio n3whx at amsat.org
Sat May 5 00:59:36 MST 2007


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.

Mark C
http://www.psh-inc.com

Tzafrir Cohen wrote:

>On Fri, May 04, 2007 at 01:59:41PM -1000, Mark Coccimiglio wrote:
>  
>
>>What I do is add an entry in the crontab file as such:
>>
>>* * * * * if [  ! `/bin/pidof -s asterisk` ]  ; then /usr/sbin/asterisk;  fi
>>
>>Its simple and it works.  Additionally if asterisk crashes then cron 
>>restarts the server in about a minute.  Just be careful with your configs.
>>    
>>
>
>It will not Just Work, because:
>
>1. you may want to give Asterisk other command-line parameters (-p, -U)
>and not do that through asterisk.conf .
>
>2. You may have your own reasons for wanting to stop asterisk
>occasionally. Having it run every minute from a cron job is a source for
>problems.
>
>3. In case running asterisk generates an error, you get a very ugly
>flood in your logs and your mailbox.
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070505/1573e000/attachment.htm


More information about the asterisk-users mailing list