[asterisk-users] Asterisk core dumps files

Gustavo A Gonzalez ggonzalez at despegar.com
Thu Jul 30 09:17:50 CDT 2009


Thanks Tzafrir for your answer. Because I had some problems running
safe_asterisk script to restart asterisk automatically in our callcenter ,
I've developed a simple script that runs from a schedule task and check if
asterisk is running each minute.  This is not the best solution yet but it
works properly when asterisk shutdown. However it not let asterisk generate
core dumps files. Is there an error in this script or what I have to change
to get core dumps files from this script.  

 

#!/bin/sh

#

#Script para levantar el asterisk automaticamente

#programado por WL

 

echo "Checking if asterisk is running"

a=`pidof asterisk`

 

if [ "$a" != "" ]; then

        echo "Everything is OK, Asterisk is UP and running";

else

        echo "Asterisk Error: NOT RUNNING trying to restart it in 5
attempts!!!";

        for ((i=1; i<=5; i+=1)); do

                /usr/sbin/asterisk -g

                

   b=`pidof asterisk`

               if [ "$b" != "" ]; then

                        exit

               fi

 

        done

fi

 

G.A.G.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090730/95f723e5/attachment.htm 


More information about the asterisk-users mailing list