[Asterisk-Users] Check and restart script..

Steven Critchfield critch at basesys.com
Wed Sep 24 10:12:25 MST 2003


On Wed, 2003-09-24 at 11:57, WipeOut . wrote:
> > Maybe you should look at init. From the init man page...
> >        When starting a  new  process,  init  first  checks  whether  the  file
> >        /etc/initscript  exists.  If  it does, it uses this script to start the
> >        process.
> > 
> >        Each time a child terminates, init records the fact and the  reason  it
> >        died  in  /var/run/utmp  and  /var/log/wtmp,  provided that these files
> >        exist.
> > 
> > The first paragraph is important to make sure your modules are loaded at
> > boot time, and the second line is important for debugging the reason why
> > asterisk tripped up. Also init will make sure asterisk is running all
> > the time you are in the appropriate runlevel you have defined.
> > 
> Hi Steven,
> 
> Would you say init is better than safe_asterisk? or do they both cover
> the same bases..

>From a quick look over the safe_asterisk script, it looks like a better
option since it squirrels away your core files for you so you can do a
better job of figuring out what went wrong. init was a top of the head
type answer to try and point out how many tools already exist to fulfill
the problem. I added it in the same manner I answered how to get ps to
output the asterisk entries without the grep being included. Sometimes
little tricks like that don't get passed from person to person unless
you are sitting over the shoulder of someone who uses those shortcuts.

-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list