mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-22 21:36:28 +00:00
automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
Makefile
2
Makefile
@@ -662,7 +662,7 @@ bininstall: all
|
|||||||
$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
|
$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
|
||||||
$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
|
$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
|
||||||
if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
|
if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
|
||||||
cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
|
cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
|
||||||
chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
|
chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
|
||||||
fi
|
fi
|
||||||
$(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
|
$(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
|
||||||
|
@@ -6,6 +6,8 @@ CONSOLE=yes # Whether or not you want a console
|
|||||||
MACHINE=`hostname` # To specify which machine has crashed when getting the mail
|
MACHINE=`hostname` # To specify which machine has crashed when getting the mail
|
||||||
DUMPDROP=/tmp
|
DUMPDROP=/tmp
|
||||||
ASTSBINDIR=__ASTERISK_SBIN_DIR__
|
ASTSBINDIR=__ASTERISK_SBIN_DIR__
|
||||||
|
ASTPIDFILE=__ASTERISK_VARRUN_DIR__/asterisk.pid
|
||||||
|
|
||||||
#
|
#
|
||||||
# Don't fork when running "safely"
|
# Don't fork when running "safely"
|
||||||
#
|
#
|
||||||
@@ -34,6 +36,11 @@ fi
|
|||||||
#
|
#
|
||||||
ulimit -c unlimited
|
ulimit -c unlimited
|
||||||
|
|
||||||
|
#
|
||||||
|
# Don't die if stdout/stderr can't be written to
|
||||||
|
#
|
||||||
|
trap '' SIGPIPE
|
||||||
|
|
||||||
#
|
#
|
||||||
# Run scripts to set any environment variables or do any other system-specific setup needed
|
# Run scripts to set any environment variables or do any other system-specific setup needed
|
||||||
#
|
#
|
||||||
@@ -53,10 +60,10 @@ run_asterisk()
|
|||||||
if [ "$TTY" != "" ]; then
|
if [ "$TTY" != "" ]; then
|
||||||
cd /tmp
|
cd /tmp
|
||||||
stty sane < /dev/${TTY}
|
stty sane < /dev/${TTY}
|
||||||
${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}
|
${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}
|
||||||
else
|
else
|
||||||
cd /tmp
|
cd /tmp
|
||||||
${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS}
|
${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS}
|
||||||
fi
|
fi
|
||||||
EXITSTATUS=$?
|
EXITSTATUS=$?
|
||||||
echo "Asterisk ended with exit status $EXITSTATUS"
|
echo "Asterisk ended with exit status $EXITSTATUS"
|
||||||
@@ -71,7 +78,11 @@ run_asterisk()
|
|||||||
echo "Asterisk on $MACHINE exited on signal $EXITSIGNAL. Might want to take a peek." | \
|
echo "Asterisk on $MACHINE exited on signal $EXITSIGNAL. Might want to take a peek." | \
|
||||||
mail -s "Asterisk Died" $NOTIFY
|
mail -s "Asterisk Died" $NOTIFY
|
||||||
fi
|
fi
|
||||||
if [ -f /tmp/core ]; then
|
|
||||||
|
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` &
|
mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -80,7 +91,11 @@ run_asterisk()
|
|||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Asterisk died with code $EXITSTATUS."
|
echo "Asterisk died with code $EXITSTATUS."
|
||||||
if [ -f /tmp/core ]; then
|
|
||||||
|
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` &
|
mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user