--- ./safe_asterisk.gjb 2004-07-18 23:07:26.000000000 -0400 +++ ./safe_asterisk 2004-07-18 23:25:02.000000000 -0400 @@ -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@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 10 done }