tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike La Budde <mike.labu...@irista.com>
Subject Re: Starting Tomcat at bootup.
Date Tue, 14 Nov 2000 23:22:06 GMT
Tony:

If you want full sysv init-style scripts you can put this in /etc/rc.d/init.d:

#!/bin/sh
#
# Startup script for Tomcat
#
# chkconfig: 345 93 06
# description: start|stop|restart Tomcat (the JSP/Servlet engine)
#

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

# See how we were called.
case "$1" in
   start)
         echo -n "Starting tomcat: "
         /opt/tomcat/bin/startup.sh
         echo
         ;;
   stop)
         echo -n "Shutting down tomcat: "
         /opt/tomcat/bin/shutdown.sh
         ;;
   restart)
         $0 stop
         $0 start
         ;;
   *)
         echo "Usage: $0 {start|stop|restart|reload|status}"
         exit 1
esac

exit 0


Then add it via:

chkconfig --add tomcat
chkconfig --level tomcat 345 on

This will start tomcat for run levels 3, 4, and 5 and stop tomcat for the 
others.

HTH,

Mike


At 11/14/2000 02:51 PM -0800, Tony Mueller wrote:
>Hi,
>
>Im running RedHat 6.2 and Tomcat 3.1.
>I would like to have Tomcat automatically start up at boot time.
>Does anyone have a way to do this?
>
>Thanks in advance!
>
>Tony Mueller


Mime
View raw message