]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 236434 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Sun, 27 Dec 2009 18:22:12 +0000 (18:22 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sun, 27 Dec 2009 18:22:12 +0000 (18:22 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r236434 | tilghman | 2009-12-27 12:20:53 -0600 (Sun, 27 Dec 2009) | 9 lines

  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@236435 65c4cc65-6c06-0410-ace0-fbb531ad65f3

contrib/init.d/rc.debian.asterisk

index 2a64428526a7d0f702df845fd7a33eb4f43b9591..5b85b076f16094339ae7eda56ede585a71e1b79e 100755 (executable)
@@ -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)