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

markster at lists.digium.com markster at lists.digium.com
Sun Jul 25 19:26:27 CDT 2004


Update of /usr/cvsroot/asterisk/contrib/scripts
In directory localhost.localdomain:/tmp/cvs-serv1675/contrib/scripts

Modified Files:
	safe_asterisk 
Log Message:
Let safe_asterisk take arguments (bug #2085)


Index: safe_asterisk
===================================================================
RCS file: /usr/cvsroot/asterisk/contrib/scripts/safe_asterisk,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- safe_asterisk	12 Mar 2004 20:20:36 -0000	1.6
+++ safe_asterisk	25 Jul 2004 23:12:33 -0000	1.7
@@ -1,4 +1,5 @@
 #!/bin/sh
+CLIARGS="$*"		# Grab any args passed to safe_asterisk
 TTY=9			# TTY (if you want one) for Asterisk to run on
 CONSOLE=yes		# Whether or not you want a console
 #NOTIFY=ben at alkaloid.net	# Who to notify about crashes
@@ -42,10 +43,10 @@
 		if [ "$TTY" != "" ]; then
 			cd /tmp
 			stty sane < /dev/${TTY}
-			asterisk ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}
+			asterisk ${CLIARGS} ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}
 		else
 			cd /tmp
-			asterisk ${ASTARGS}
+			asterisk ${CLIARGS} ${ASTARGS}
 		fi
 		EXITSTATUS=$?
 		echo "Asterisk ended with exit status $EXITSTATUS"
@@ -75,7 +76,7 @@
 			fi
 		fi
 		echo "Automatically restarting Asterisk."
-		sleep 1
+		sleep 4
 	done
 }
 




More information about the svn-commits mailing list