tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/bin catalina.sh
Date Fri, 24 Dec 2004 17:17:34 GMT
markt       2004/12/24 09:17:34

  Modified:    catalina/src/bin catalina.sh
  Log:
  Fix bug 28305. Provide greater control over redirection of stdout and stderr
   - Patch provided by Daniel Rall
  
  Revision  Changes    Path
  1.38      +13 -4     jakarta-tomcat-4.0/catalina/src/bin/catalina.sh
  
  Index: catalina.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- catalina.sh	15 Aug 2004 15:20:15 -0000	1.37
  +++ catalina.sh	24 Dec 2004 17:17:34 -0000	1.38
  @@ -17,6 +17,9 @@
   #                   the JVM should use (java.io.tmpdir).  Defaults to
   #                   $CATALINA_BASE/temp.
   #
  +#   CATALINA_OUT    (Optional) Location of the file to which stdout and stderr
  +#                   are written.  Defaults to $CATALINA_BASE/logs/catalina.out.
  +#
   #   JAVA_HOME       Must point at your Java Development Kit installation.
   #
   #   JAVA_OPTS       (Optional) Java runtime options used when the "start",
  @@ -115,6 +118,11 @@
     CATALINA_TMPDIR="$CATALINA_BASE"/temp
   fi
   
  +if [ -z "$CATALINA_OUT" ] ; then
  +  # Use default location for redirected stdout/stderr
  +  CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out
  +fi
  +
   # For Cygwin, switch paths to Windows format before running java
   if $cygwin; then
     JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  @@ -131,6 +139,7 @@
   echo "Using CATALINA_BASE:   $CATALINA_BASE"
   echo "Using CATALINA_HOME:   $CATALINA_HOME"
   echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
  +echo "Using CATALINA_OUT:    $CATALINA_OUT"
   echo "Using JAVA_HOME:       $JAVA_HOME"
   
   if [ "$1" = "jpda" ] ; then
  @@ -214,7 +223,7 @@
   elif [ "$1" = "start" ] ; then
   
     shift
  -  touch "$CATALINA_BASE"/logs/catalina.out
  +  touch "$CATALINA_OUT"
     if [ "$1" = "-security" ] ; then
       echo "Using Security Manager"
       shift
  @@ -226,7 +235,7 @@
         -Dcatalina.home="$CATALINA_HOME" \
         -Djava.io.tmpdir="$CATALINA_TMPDIR" \
         org.apache.catalina.startup.Bootstrap "$@" start \
  -      >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
  +      >> "$CATALINA_OUT" 2>&1 &
   
         if [ ! -z "$CATALINA_PID" ]; then
           echo $! > $CATALINA_PID
  @@ -238,7 +247,7 @@
         -Dcatalina.home="$CATALINA_HOME" \
         -Djava.io.tmpdir="$CATALINA_TMPDIR" \
         org.apache.catalina.startup.Bootstrap "$@" start \
  -      >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
  +      >> "$CATALINA_OUT" 2>&1 &
   
         if [ ! -z "$CATALINA_PID" ]; then
           echo $! > $CATALINA_PID
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message