diff options
author | Mark Spencer <markster@digium.com> | 2004-07-25 23:12:33 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-07-25 23:12:33 +0000 |
commit | eb718e597d000756fc97a44dd9a75c33d33fe9b7 (patch) | |
tree | bef8dcae7ffa467d5ff90e77c5ad977d20d3417b /contrib/scripts/safe_asterisk | |
parent | 1bfdd45fca2b48ee1698b89e185aff9f75ab8c6a (diff) |
Let safe_asterisk take arguments (bug #2085)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib/scripts/safe_asterisk')
-rwxr-xr-x | contrib/scripts/safe_asterisk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/scripts/safe_asterisk b/contrib/scripts/safe_asterisk index ee2cc7717..56a8d36c3 100755 --- a/contrib/scripts/safe_asterisk +++ b/contrib/scripts/safe_asterisk @@ -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 @@ run_asterisk() 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 @@ run_asterisk() fi fi echo "Automatically restarting Asterisk." - sleep 1 + sleep 4 done } |