diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/scripts/safe_asterisk | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/contrib/scripts/safe_asterisk b/contrib/scripts/safe_asterisk index 54d36df60..14d9b35ec 100644 --- a/contrib/scripts/safe_asterisk +++ b/contrib/scripts/safe_asterisk @@ -149,18 +149,13 @@ run_asterisk() mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` & fi else - if [ "${EXITSTATUS}" = "0" ]; then - echo "Asterisk ended normally. Aborting." - exit 0 - else - echo "Asterisk died with code $EXITSTATUS." - - PID=`cat ${ASTPIDFILE}` - if [ -f /tmp/core.${PID} ]; then - mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-`date -Iseconds` & - elif [ -f /tmp/core ]; then - mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` & - fi + echo "Asterisk died with code $EXITSTATUS." + + PID=`cat ${ASTPIDFILE}` + if [ -f /tmp/core.${PID} ]; then + mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-`date -Iseconds` & + elif [ -f /tmp/core ]; then + mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` & fi fi echo "Automatically restarting Asterisk." |