[asterisk-users] Starting Asterisk on Ubuntu 7.04

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri May 4 22:53:08 MST 2007


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.

-- 
               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