mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Merged revisions 269334 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r269334 | pabelanger | 2010-06-09 13:24:53 -0400 (Wed, 09 Jun 2010) | 12 lines Fix Debian init script to not use -c. When using the init script as-is currently, it could cause issues on Debian such as high CPU usage. This fix has worked for several people so I'm implementing the change. We now handle color displays properly. (closes issue #16784) Reported by: pabelanger Patches: 20100530__issue16784__2.diff.txt uploaded by tilghman (license 14) Tested by: pabelanger, tilghman ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -50,7 +50,7 @@ if ! [ -d $ASTETCDIR ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Use the LSB standar functions for services management
|
||||
# Use the LSB standard functions for services management
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
# Allow configuration overrides in /etc/default/asterisk
|
||||
@@ -76,7 +76,6 @@ case "$1" in
|
||||
if [ ! -d $ASTVARRUNDIR ]; then
|
||||
mkdir -p $ASTVARRUNDIR
|
||||
fi
|
||||
|
||||
if [ $AST_USER ] ; then
|
||||
ASTARGS="-U $AST_USER"
|
||||
chown $AST_USER $ASTVARRUNDIR
|
||||
@@ -108,13 +107,11 @@ case "$1" in
|
||||
if [ "x$TEMPRECORDINGLOCATION" = "xyes" -o "x$TMPRECORDINGLOCATION" = "xyes" ]; then
|
||||
ASTARGS="$ASTARGS -t"
|
||||
fi
|
||||
# "start-stop-daemon --oknodo" returns 0 even if Asterisk was already running (as LSB expects):
|
||||
if test "x$COLOR" = "xyes" ; then
|
||||
export TERM=linux
|
||||
start-stop-daemon --start --oknodo --background --exec $DAEMON -- $ASTARGS -c
|
||||
else
|
||||
start-stop-daemon --start --oknodo --exec $DAEMON -- $ASTARGS
|
||||
if test "x$COLOR" = "xno" ; then
|
||||
ASTARGS="$ASTARGS -n"
|
||||
fi
|
||||
# "start-stop-daemon --oknodo" returns 0 even if Asterisk was already running (as LSB expects):
|
||||
start-stop-daemon --start --oknodo --exec $DAEMON -- $ASTARGS
|
||||
log_end_msg $?
|
||||
;;
|
||||
stop)
|
||||
|
Reference in New Issue
Block a user