diff --git a/contrib/init.d/rc.debian.asterisk b/contrib/init.d/rc.debian.asterisk index 6431d2d1ae31a3164a51b506979a5c8b6574dbce..045a8ceefd45de332445c523d8eda57231616154 100755 --- a/contrib/init.d/rc.debian.asterisk +++ b/contrib/init.d/rc.debian.asterisk @@ -49,6 +49,10 @@ TRUE=/bin/true #AST_USER="asterisk" #AST_GROUP="asterisk" +# If you DON'T want Asterisk to start up with terminal colors, comment +# this out. +COLOR=yes + set -e if ! [ -x $DAEMON ] ; then @@ -88,7 +92,12 @@ case "$1" in chgrp $AST_GROUP $ASTVARRUNDIR fi # "start-stop-daemon --oknodo" returns 0 even if Asterisk was already running (as LSB expects): - start-stop-daemon --start --oknodo --exec $DAEMON -- $ASTARGS + 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 + fi log_end_msg $? ;; stop)