aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-27 18:19:38 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-27 18:19:38 +0000
commitbbee2d187d6cfd4c4ab56f39313977c0ed44b817 (patch)
treeefcffcf31ee17fb6769847f211b3125cc8f4cad8 /contrib
parent59dcb91cb022e44fb5fed77da690712f5081d17f (diff)
Turn on colors in the daemon, since there's many requests for it on Ubuntu.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@236433 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/init.d/rc.debian.asterisk11
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/init.d/rc.debian.asterisk b/contrib/init.d/rc.debian.asterisk
index 015f2db30..1742d5001 100755
--- a/contrib/init.d/rc.debian.asterisk
+++ b/contrib/init.d/rc.debian.asterisk
@@ -35,6 +35,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
@@ -68,7 +72,12 @@ case "$1" in
ASTARGS="$ASTARGS -G $AST_GROUP"
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)