From 8d4e963cc495ec5f41a3d2e36d75220d77be91c8 Mon Sep 17 00:00:00 2001 From: tilghman Date: Sun, 27 Dec 2009 18:20:53 +0000 Subject: Merged revisions 236433 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r236433 | tilghman | 2009-12-27 12:19:38 -0600 (Sun, 27 Dec 2009) | 2 lines Turn on colors in the daemon, since there's many requests for it on Ubuntu. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@236434 f38db490-d61c-443f-a65b-d21fe96a405b --- contrib/init.d/rc.debian.asterisk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/init.d/rc.debian.asterisk b/contrib/init.d/rc.debian.asterisk index 6431d2d1a..045a8ceef 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) -- cgit v1.2.3