summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers/tomcat/files/5.5.20/tomcat.init')
-rwxr-xr-xwww-servers/tomcat/files/5.5.20/tomcat.init19
1 files changed, 12 insertions, 7 deletions
diff --git a/www-servers/tomcat/files/5.5.20/tomcat.init b/www-servers/tomcat/files/5.5.20/tomcat.init
index 4818d8e01978..ccc86228b1f2 100755
--- a/www-servers/tomcat/files/5.5.20/tomcat.init
+++ b/www-servers/tomcat/files/5.5.20/tomcat.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/5.5.20/tomcat.init,v 1.1 2006/09/28 16:36:00 wltjr Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/5.5.20/tomcat.init,v 1.2 2007/01/10 19:44:57 wltjr Exp $
init_env_vars() {
# Set some sane defaults
@@ -33,6 +33,8 @@ init_env_vars() {
-Dcatalina.home=${CATALINA_HOME} \
-Djava.io.tmpdir=${CATALINA_TMPDIR} \
org.apache.catalina.startup.Bootstrap "
+
+ STD_OUT=" >> ${CATALINA_BASE}/logs/catalina.out 2>&1 &"
}
start-helper() {
@@ -54,20 +56,23 @@ start() {
# Figure out what arguments to pass start-helper based on TOMCAT_START
if [[ "${TOMCAT_START}" == "debug" ]] ; then
start-helper ${JAVA_HOME}/bin/jdb \
- -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share
+ -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share \
+ ${STD_OUT}
elif [[ "${TOMCAT_START}" == "debug -security" ]] ; then
start-helper ${JAVA_HOME}/bin/jdb \
-sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share \
-Djava.security.manager \
- -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
+ -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy \
+ ${STD_OUT}
elif [[ "${TOMCAT_START}" == "jpda start" ]] ; then
- start-helper ${JAVA_HOME}/bin/java ${JPDA_OPTS}
+ start-helper ${JAVA_HOME}/bin/java ${JPDA_OPTS} ${STD_OUT}
elif [[ "${TOMCAT_START}" == "start" ]] ; then
- start-helper ${JAVA_HOME}/bin/java
+ start-helper ${JAVA_HOME}/bin/java ${STD_OUT}
elif [[ "${TOMCAT_START}" == "start -security" ]] ; then
start-helper ${JAVA_HOME}/bin/java \
-Djava.security.manager \
- -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
+ -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy \
+ ${STD_OUT}
else
eerror "Invalid TOMCAT_START variable value, or one is not set"
eerror "Please see /etc/conf.d/tomcat-5.5 for more information"
@@ -81,6 +86,6 @@ stop() {
init_env_vars
start-stop-daemon --stop --quiet \
--make-pidfile --pidfile /var/run/tomcat.pid \
- --exec ${JAVA_HOME}/bin/java -- ${OPTS_CP} ${CATALINA_ARGS} stop
+ --exec ${JAVA_HOME}/bin/java -- ${OPTS_CP} ${CATALINA_ARGS} stop ${STD_OUT}
eend $?
}