You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mike Gruber <mg...@net-west.com> on 2001/04/25 18:06:51 UTC

Tomcat Init At Boot

I am currently using the binary versions of Tomcat 3.2.1 and JDK 1.3.0_02 on
Caldera eServer 2.3.  I have placed a tomcat init script in the init.d
directory (see script below) and linked to in from the various rcx.d dirs.
My problem is that the script is being run during the boot sequence, but
Tomcat never starts.  If I run the exact same script from the command line
(as root) however, Tomcat starts no problem.  The log files aren't reporting
any noticeable errors when Tomcat fails to load at boot, so I am unsure what
the discrepancy is between init running the script and the root user running
the script.  Any information or advice anyone can give me on this problem
will be greatly appreciated.

MGRUBER

ps - I have tried other init scripts and I get the same result with them
all.  Here is the latest version:

---------------------------------------------------
#!/bin/sh
#
# Start/Stop Jakarta Tomcat

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

export PATH=$PATH:/usr/java/jdk1.3.0_02/bin
export JAVA_HOME=/usr/java/jdk1.3.0_02
export TOMCAT_HOME=/usr/java/jakarta-tomcat-3.2.1

case "$1" in
  start)
    echo -n "Starting tomcat: "
    daemon "/usr/java/jakarta-tomcat-3.2.1/bin/tomcat start"
    echo
    touch /var/lock/subsys/tomcat
    ;;
  stop)
    echo -n "Shutting down tomcat: "
    daemon "/usr/java/jakarta-tomcat-3.2.1/bin/tomcat stop"
    echo
    rm -f /var/lock/subsys/tomcat
    rm -f /var/run/tomcat.pid
    ;;
  restart)
    $0 stop
    sleep 2
    $0 start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac

exit 0
---------------------------------------------------