View | Details | Raw Unified | Return to bug 53930
Collapse All | Expand All

(-)catalina.sh (-9 / +21 lines)
Lines 33-38 Link Here
33
#                   will be redirected.
33
#                   will be redirected.
34
#                   Default is $CATALINA_BASE/logs/catalina.out
34
#                   Default is $CATALINA_BASE/logs/catalina.out
35
#
35
#
36
#   CATALINA_OUT_CMD (Optional) Command which will be executed and receive
37
#                   as its stdin the stdout and stderr from the Tomcat java
38
#                   process.  Only used if CATALINA_OUT is not defined.
39
#                   No default.
40
#                   Example (all one line)
41
#                   CATALINA_OUT_CMD="cronolog $CATALINA_BASE/logs/catalina.%Y-%m-%d.out >/dev/null 2>&1"
42
#
36
#   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
43
#   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
37
#                   "run" or "debug" command is executed.
44
#                   "run" or "debug" command is executed.
38
#                   Include here and not in JAVA_OPTS all options, that should
45
#                   Include here and not in JAVA_OPTS all options, that should
Lines 369-381 Link Here
369
  fi
376
  fi
370
377
371
  shift
378
  shift
372
  touch "$CATALINA_OUT"
379
  if [ -z "$CATALINA_OUT_CMD" ] ; then
380
    catalina_out_command=">> \"$CATALINA_OUT\" 2>&1"
381
  else
382
    catalina_out_command="| $CATALINA_OUT_CMD"
383
  fi
384
  if [ ! -z "$CATALINA_PID" ]; then
385
    catalina_pid_file="$CATALINA_PID"
386
  else
387
    catalina_pid_file=/dev/null
388
  fi
373
  if [ "$1" = "-security" ] ; then
389
  if [ "$1" = "-security" ] ; then
374
    if [ $have_tty -eq 1 ]; then
390
    if [ $have_tty -eq 1 ]; then
375
      echo "Using Security Manager"
391
      echo "Using Security Manager"
376
    fi
392
    fi
377
    shift
393
    shift
378
    eval \"$_RUNJAVA\" \"$LOGGING_CONFIG\" $JAVA_OPTS $CATALINA_OPTS \
394
    eval \{ \"$_RUNJAVA\" \"$LOGGING_CONFIG\" $JAVA_OPTS $CATALINA_OPTS \
379
      -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath \"$CLASSPATH\" \
395
      -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath \"$CLASSPATH\" \
380
      -Djava.security.manager \
396
      -Djava.security.manager \
381
      -Djava.security.policy==\"$CATALINA_BASE/conf/catalina.policy\" \
397
      -Djava.security.policy==\"$CATALINA_BASE/conf/catalina.policy\" \
Lines 383-405 Link Here
383
      -Dcatalina.home=\"$CATALINA_HOME\" \
399
      -Dcatalina.home=\"$CATALINA_HOME\" \
384
      -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
400
      -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
385
      org.apache.catalina.startup.Bootstrap "$@" start \
401
      org.apache.catalina.startup.Bootstrap "$@" start \
386
      >> "$CATALINA_OUT" 2>&1 "&"
402
      2\>\&1 \& echo \$! \>\"$catalina_pid_file\" \; \} $catalina_out_command "&"
387
403
388
  else
404
  else
389
    eval \"$_RUNJAVA\" \"$LOGGING_CONFIG\" $JAVA_OPTS $CATALINA_OPTS \
405
    eval \{ \"$_RUNJAVA\" \"$LOGGING_CONFIG\" $JAVA_OPTS $CATALINA_OPTS \
390
      -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath \"$CLASSPATH\" \
406
      -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath \"$CLASSPATH\" \
391
      -Dcatalina.base=\"$CATALINA_BASE\" \
407
      -Dcatalina.base=\"$CATALINA_BASE\" \
392
      -Dcatalina.home=\"$CATALINA_HOME\" \
408
      -Dcatalina.home=\"$CATALINA_HOME\" \
393
      -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
409
      -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
394
      org.apache.catalina.startup.Bootstrap "$@" start \
410
      org.apache.catalina.startup.Bootstrap "$@" start \
395
      >> "$CATALINA_OUT" 2>&1 "&"
411
      2\>\&1 \& echo \$! \>\"$catalina_pid_file\" \; \} $catalina_out_command "&"
396
412
397
  fi
413
  fi
398
414
399
  if [ ! -z "$CATALINA_PID" ]; then
400
    echo $! > "$CATALINA_PID"
401
  fi
402
403
elif [ "$1" = "stop" ] ; then
415
elif [ "$1" = "stop" ] ; then
404
416
405
  shift
417
  shift

Return to bug 53930