3 # Startup script for the Jakarta Tomcat Java Servlets and JSP server
6 # description: Jakarta Tomcat Java Servlets and JSP server
8 # pidfile: /var/run/tomcat.pid
11 # Source function library.
12 .
/etc
/rc.d
/init.d
/functions
14 # Source networking configuration.
15 .
/etc
/sysconfig
/network
17 # Check that networking is up.
18 [ ${NETWORKING} = "no" ] && exit 0
20 # Set Tomcat environment.
21 export JAVA_HOME
=/usr
/java
/jre1.5
.0_04
22 export CLASSPATH
=.
:/usr
/java
/jre1.5
.0_04
/lib
/tools.jar
:/usr
/java
/jre1.5
.0_04
/lib
/rt.jar
23 export CATALINA_HOME
=/usr
/local
/tomcat
24 export CATALINA_OPTS
="-server -Xms64m -Xmx512m -Dbuild.compiler.emacs=true"
25 export PATH
=/usr
/java
/jre1.5
.0_04
/bin
:$PATH
27 [ -f /usr
/local
/tomcat
/bin
/startup.sh
] ||
exit 0
28 [ -f /usr
/local
/tomcat
/bin
/shutdown.sh
] ||
exit 0
30 export PATH
=$PATH:/usr
/bin
:/usr
/local
/bin
32 # See how we were called.
36 echo -n "Starting Tomcat: "
37 /usr
/local
/tomcat
/bin
/startup.sh
40 [ $RETVAL = 0 ] && touch /var
/lock
/subsys
/tomcat
44 echo -n "Shutting down Tomcat: "
45 /usr
/local
/tomcat
/bin
/shutdown.sh
48 [ $RETVAL = 0 ] && rm -f /var
/lock
/subsys
/tomcat
55 [ -e /var
/lock
/subsys
/tomcat
] && $0 restart
61 echo "Usage: $0 {start|stop|restart|status}"