On Thu, 2002-06-06 at 12:05, Jean-Luc BEAUDET wrote: > Hi all, > Well my Tomcat engine is runnin' under a special user, let's say > wildcat. > > I'm looking for a way to automatically start this engine at system > boot, like i do with Apache. > > Jean-Luc :O)
here's my /etc/rc.d/initd/tomcat script. to start oracle / tomcat / apache (in that order) with linux i just make symbollic links like: [/etc/rc.d/rc5.d] S82tomcat -> ../init.d/tomcat hope that helps... -Alexander. #!/bin/sh # # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network TOMCAT_HOME=/home/bruggenc/tomcat TOMCAT_OWNER=bruggenc export JAVA_HOME=/usr/java/j2sdk1.4.0 if [ ! -f $TOMCAT_HOME/bin/startup.sh -o ! -d $TOMCAT_HOME ]; then echo "Tomcat startup: cannot start" exit fi # See how we were called. case "$1" in start) echo -n "Starting Tomcat: " su - $TOMCAT_OWNER -c $TOMCAT_HOME/bin/startup.sh echo touch /var/lock/subsys/tomcat ;; stop) # Stop daemons. echo -n "Shutting down Tomcat: " su - $TOMCAT_OWNER -c $TOMCAT_HOME/bin/shutdown.sh echo rm -f /var/lock/subsys/tomcat ;; restart) $0 stop $0 start ;; status) ;; *) echo "Usage: tomcat {start|stop|restart|status}" exit 1 esac exit 0
signature.asc
Description: This is a digitally signed message part