diff options
Diffstat (limited to 'system/apache-tomcat/rc.tomcat')
-rw-r--r-- | system/apache-tomcat/rc.tomcat | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/system/apache-tomcat/rc.tomcat b/system/apache-tomcat/rc.tomcat index 478528d1afca8..75c083b67952c 100644 --- a/system/apache-tomcat/rc.tomcat +++ b/system/apache-tomcat/rc.tomcat @@ -26,9 +26,11 @@ done USER="tomcat" -TOMCAT_CMD="/usr/bin/jsvc -user $USER -cp $CLASSPATH \ +JSVC="/usr/bin/jsvc" +TOMCAT_CMD="-user $USER -cp $CLASSPATH \ -pidfile $PIDFILE -outfile $LOGFILE -errfile $LOGFILE \ -Xms$MEMALLOC_MIN -Xmx$MEMALLOC_MAX -Xss$STACK -XX:MaxPermSize=$MAXPERMSIZE \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ -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 \ @@ -41,7 +43,7 @@ tomcat_start() { else unset DISPLAY cd /var/lib/tomcat - $TOMCAT_CMD + $JSVC $TOMCAT_CMD echo "done!" fi } @@ -49,9 +51,9 @@ tomcat_start() { tomcat_stop() { echo -n "Stopping Apache Tomcat ... " if [ -e "$PIDFILE" ]; then - kill -TERM $(cat $PIDFILE) > /dev/null 2>&1 + cd /var/lib/tomcat + $JSVC -stop $TOMCAT_CMD echo "done!" - rm -f "$PIDFILE" else echo "not running!" fi |