tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Wright <>
Subject using init.d script to start tomcat
Date Tue, 03 Oct 2000 20:29:14 GMT
Apache 1.3.12/Tomcat3.1/Turbolinux6.0.2

I am 2 weeks into my introduction to Linux/Apache/Tomcat etc so please
forgive if this question serves only to highlight my ignorance.

I have got everything configured and running just fine so that the jsp
examples run from a browser on a networked machine.

After finding a script on the apache site by a Manik Surtani for
starting tomcat via init.d I changed it slightly as below and set up the
links for startup and shutdown at the various runlevels required.  It
seems to work ok in that on reboot the JSP stuff works fine.  However
after startup a bunch of java class paths appear on screen followed by a
pause then the login prompt.  Then after another longer pause I get lots
of stuff sent to the screen with lines starting "context log:......."

These messages did not appear when I ran the start script by
hand.  This only confuses me because the script below seems to me to do
little more than run the start script anyway.

Everything still seems to work just fine but I don't understand this and
it makes me nervous!

If anyone out there could explain this and suggest something to tidy it
up I would be very grateful.

Thanks for taking the time to read this.

Alan Wright

# Startup script for Tomcat
# chkconfig: 345 86 14
# description: Tomcat used to serve JSP pages\
# processname: n/a (runs under jvm)
# pidfile: /var/run/
# config: /opt/jakarta-tomcat/conf/custom-tomcat-apache.conf

# Source function library.
. /etc/rc.d/init.d/functions

source /root/.bashrc
export TOMCAT_HOME=/opt/jakarta-tomcat
export CLASSPATH=$JAVA_HOME/lib:/opt/jakarta-tomcat/classes

# added by wrighta - so tomcat start can find java
export PATH

# See how we were called.
case "$1" in
 echo -n "Starting Tomcat: "
 daemon $TOMCAT_HOME/bin/ start
 echo -n "Shutting down Tomcat: "
 daemon $TOMCAT_HOME/bin/ stop
 $0 stop
 $0 start
 echo "Usage: $0 {start|stop|restart}"
 exit 1

exit 0

View raw message