#!/bin/bash # # Startup script for the Tomcat server # # chkconfig: - 83 53 # description: Starts and stops the Tomcat daemon. # processname: tomcat # pidfile: /var/run/tomcat.pid export JAVA_HOME=/usr/lib/java #You may need to edit this line export CATALINA_HOME=/usr/share/tomcat #You may need to edit this line export CATALINA_OPTS="-Xmx256M" export CATALINA_PID=/var/run/tomcat.pid export NICENESS=10 #See how we were called. case $1 in start) sh $CATALINA_HOME/bin/shutdown.sh -force nice -n $NICENESS $CATALINA_HOME/bin/startup.sh ;; stop) sh $CATALINA_HOME/bin/shutdown.sh -force ;; restart) sh $CATALINA_HOME/bin/shutdown.sh -force nice -n $NICENESS $CATALINA_HOME/bin/startup.sh ;; *) echo "Usage: /etc/init.d/tomcat start|stop|restart" ;; esac exit 0