[Asterisk-cvs] asterisk/contrib/scripts safe_asterisk,1.5,1.6

markster at lists.digium.com markster at lists.digium.com
Fri Mar 12 15:27:13 CST 2004


Update of /usr/cvsroot/asterisk/contrib/scripts
In directory mongoose.digium.com:/tmp/cvs-serv15617/contrib/scripts

Modified Files:
	safe_asterisk 
Log Message:
Fix safe_asterisk script


Index: safe_asterisk
===================================================================
RCS file: /usr/cvsroot/asterisk/contrib/scripts/safe_asterisk,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- safe_asterisk	7 May 2003 22:33:55 -0000	1.5
+++ safe_asterisk	12 Mar 2004 20:20:36 -0000	1.6
@@ -64,13 +64,18 @@
 				mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
 			fi
 		else
-			echo "Asterisk died with code $EXITSTATUS.  Aborting."
-                        if [ -f /tmp/core ]; then
-				mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
+			if [ "${EXITSTATUS}" = "0" ]; then
+				echo "Asterisk ended normally.  Aborting."
+				exit 0
+			else
+				echo "Asterisk died with code $EXITSTATUS."
+	                        if [ -f /tmp/core ]; then
+					mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
+				fi
 			fi
-			exit 0
 		fi
 		echo "Automatically restarting Asterisk."
+		sleep 1
 	done
 }
 




More information about the svn-commits mailing list