aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-09 17:34:38 +0000
committerpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-09 17:34:38 +0000
commit68dadecc723c6fb8f8ab922c4274c9b2e03b25f6 (patch)
tree8f4edbf9cda08f7356818ad89cd97bfa73c279da /contrib
parentf5ee583bae938058b0bcbf3c8653f806e7b8e456 (diff)
Merged revisions 269346 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r269346 | pabelanger | 2010-06-09 13:32:52 -0400 (Wed, 09 Jun 2010) | 19 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@269347 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/init.d/rc.debian.asterisk13
1 files changed, 5 insertions, 8 deletions
diff --git a/contrib/init.d/rc.debian.asterisk b/contrib/init.d/rc.debian.asterisk
index f88f60e0c..c8e13ef41 100755
--- a/contrib/init.d/rc.debian.asterisk
+++ b/contrib/init.d/rc.debian.asterisk
@@ -53,7 +53,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
case "$1" in
@@ -70,7 +70,6 @@ case "$1" in
if [ ! -d $ASTVARRUNDIR ]; then
mkdir -p $ASTVARRUNDIR
fi
-
if [ $AST_USER ] ; then
ASTARGS="-U $AST_USER"
chown $AST_USER $ASTVARRUNDIR
@@ -79,13 +78,11 @@ case "$1" in
ASTARGS="$ASTARGS -G $AST_GROUP"
chgrp $AST_GROUP $ASTVARRUNDIR
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)