Skip to content
Snippets Groups Projects
Commit 3a2f0750 authored by Mark Spencer's avatar Mark Spencer
Browse files

Fix safe_asterisk script

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 4efa995a
No related branches found
No related tags found
No related merge requests found
...@@ -64,13 +64,18 @@ run_asterisk() ...@@ -64,13 +64,18 @@ run_asterisk()
mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` & mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
fi fi
else else
echo "Asterisk died with code $EXITSTATUS. Aborting." if [ "${EXITSTATUS}" = "0" ]; then
if [ -f /tmp/core ]; then echo "Asterisk ended normally. Aborting."
mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` & exit 0
else
echo "Asterisk died with code $EXITSTATUS."
if [ -f /tmp/core ]; then
mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
fi
fi fi
exit 0
fi fi
echo "Automatically restarting Asterisk." echo "Automatically restarting Asterisk."
sleep 1
done done
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment