mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-01 18:09:41 +00:00
Fix safe_asterisk script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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
|
||||||
|
echo "Asterisk ended normally. Aborting."
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Asterisk died with code $EXITSTATUS."
|
||||||
if [ -f /tmp/core ]; then
|
if [ -f /tmp/core ]; then
|
||||||
mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
|
mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
|
||||||
fi
|
fi
|
||||||
exit 0
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Automatically restarting Asterisk."
|
echo "Automatically restarting Asterisk."
|
||||||
|
sleep 1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user