freeswitch/scripts/freeswitch-reporter
Brian West e00dd514c6 fix path
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16444 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-01-22 00:31:43 +00:00

30 lines
675 B
Bash

#!/bin/sh
email=traces@freeswitch.org
errorlvl=1
while [ $errorlvl -gt 0 ]
do
/usr/local/freeswitch/bin/freeswitch -core
errorlvl=$?
if [ $errorlvl -gt 0 ]; then
pid=$(cat /usr/local/freeswitch/run/freeswitch.pid)
corefile=core.$pid
tempfile=$(tempfile)
if [ -f $corefile ]; then
reset
echo From: freeswitch@jasongarland.com >>$tempfile
echo >>$tempfile
echo >>$tempfile
echo Host: $(hostname -f) >>$tempfile
gdb /usr/local/freeswitch/bin/freeswitch -c $corefile \
--eval-command='set pagination off' \
--eval-command='bt full' \
--eval-command='quit' >>$tempfile
cat $tempfile|rmail $email
rm $tempfile
fi
fi
#sleep 5s
done