<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Tzafrir;<br>
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 <br>
haven't really thought about this.<br>
<br>
1) In a production environment you should NOT be messing with the
config. That's what test hardware is for.<br>
<br>
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<br>
<br>
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.<br>
<br>
I prefer to keep things as simple as possible. Sure scripts like
"safe_asterisk" are nice and do some<br>
really neat things but lets face it how often do you actually sit at
the console of your asterisk box. My <br>
main PBX is located about 7 feet from my office desk and I still mostly
use ssh (not even telnet) to get<br>
into the box.<br>
<br>
Mark C<br>
<a class="moz-txt-link-freetext" href="http://www.psh-inc.com">http://www.psh-inc.com</a><br>
<br>
Tzafrir Cohen wrote:
<blockquote cite="mid20070505055304.GG10209@xorcom.com" type="cite">
<pre wrap="">On Fri, May 04, 2007 at 01:59:41PM -1000, Mark Coccimiglio wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap=""><!---->
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.
</pre>
</blockquote>
</body>
</html>