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.
_______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users