auth: tidyup Authenticator
[remote/remote-ws.git] / doc / etc / init.d / tomcat
blob216fd0ee33c3d18da607419a0125ebcf2fe4bcc8
1 #!/bin/sh
3 # Startup script for the Jakarta Tomcat Java Servlets and JSP server
5 # chkconfig: - 85 15
6 # description: Jakarta Tomcat Java Servlets and JSP server
7 # processname: tomcat
8 # pidfile: /var/run/tomcat.pid
9 # config:
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.
33 case "$1" in
34 start)
35 # Start daemon.
36 echo -n "Starting Tomcat: "
37 /usr/local/tomcat/bin/startup.sh
38 RETVAL=$?
39 echo
40 [ $RETVAL = 0 ] && touch /var/lock/subsys/tomcat
42 stop)
43 # Stop daemons.
44 echo -n "Shutting down Tomcat: "
45 /usr/local/tomcat/bin/shutdown.sh
46 RETVAL=$?
47 echo
48 [ $RETVAL = 0 ] && rm -f /var/lock/subsys/tomcat
50 restart)
51 $0 stop
52 $0 start
54 condrestart)
55 [ -e /var/lock/subsys/tomcat ] && $0 restart
57 status)
58 status tomcat
61 echo "Usage: $0 {start|stop|restart|status}"
62 exit 1
63 esac
65 exit 0