summaryrefslogtreecommitdiff
path: root/system/apache-tomcat/rc.tomcat
diff options
context:
space:
mode:
Diffstat (limited to 'system/apache-tomcat/rc.tomcat')
-rw-r--r--system/apache-tomcat/rc.tomcat19
1 files changed, 15 insertions, 4 deletions
diff --git a/system/apache-tomcat/rc.tomcat b/system/apache-tomcat/rc.tomcat
index 83ca5ccc9b..97966a68ce 100644
--- a/system/apache-tomcat/rc.tomcat
+++ b/system/apache-tomcat/rc.tomcat
@@ -1,18 +1,26 @@
#!/bin/sh
# Start/stop/restart apache-tomcat.
-# $Id: rc.apache-tomcat,v 1.1.4 2011/04/01
+# $Id: rc.apache-tomcat,v 1.2.0 2013/11/30
# Authors: Heinz Wiesinger <pprkut@liwjatan.at>, Vincent Batts <vbatts@hashbangbash.com>
# ---------------------------------------------------------------------------
# Load tomcat specific java vm options
. /etc/tomcat/tomcat-java.conf
+# Load environment variables
+. /etc/profile.d/apache-tomcat.sh
+if [ -e "/etc/profile.d/openjdk.sh" ]; then
+ . /etc/profile.d/openjdk.sh
+else
+ . /etc/profile.d/jdk.sh
+fi
+
PIDFILE="/var/spool/tomcat/tomcat.pid"
LOGFILE="/var/log/tomcat/tomcat.log"
-CLASSPATH="/usr/share/tomcat/bin/bootstrap.jar:/usr/share/java/commons-daemon.jar"
-for i in /usr/share/tomcat/lib/*.jar; do
- CLASSPATH=$CLASSPATH:$i
+CLASSPATH="$CATALINA_BASE/bin/bootstrap.jar:/usr/share/java/commons-daemon.jar"
+for i in $CATALINA_LIBDIR/*.jar; do
+ CLASSPATH=$CLASSPATH:$i
done
USER="tomcat"
@@ -20,6 +28,9 @@ USER="tomcat"
TOMCAT_CMD="/usr/bin/jsvc -user $USER -cp $CLASSPATH \
-pidfile $PIDFILE -outfile $LOGFILE -errfile $LOGFILE \
-Xms$MEMALLOC_MIN -Xmx$MEMALLOC_MAX -Xss$STACK -XX:MaxPermSize=$MAXPERMSIZE \
+ -Dcatalina.home=$CATALINA_HOME -Dcatalina.base=$CATALINA_BASE \
+ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+ -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \
-Djava.awt.headless=true org.apache.catalina.startup.Bootstrap"
tomcat_start() {