Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Need help on automating Tomcat startup and shutdown on HP-UX

Weifeng Wang

2004-10-05


Good Afternoon,

I am having problem in automating Tomcat (4.1.30) startup and shutdown on
HP-UX B.11.11 platform. I have created a script named "tomcat" in
/sbin/init.d directory. I can start up and shut down Tomcat by running
this script manually with the super user (root) account. But, it always
fails where the machine reboots. Here is the error message in /etc/rc.log
file:

Starting up Tomcat
Output from "/sbin/rc3.d/S999tomcat start":
----------------------------
/opt/jakarta-tomcat-4.1.30/bin/startup.sh[21]: dirname: not found.
Cannot find /catalina.sh
This file is needed to run this program
"/sbin/rc3.d/S999tomcat start" FAILED

Here is the /sbin/init.d/tomcat script:

CATALINA_BASE=/opt/jakarta-tomcat-4.1.30
export CATALINA_BASE
CATALINA_HOME=$CATALINA_BASE
export CATALINA_HOME
CATALINA_TMPDIR=$CATALINA_HOME/temp
export CATALINA_TMPDIR
JAVA_HOME=/opt/java1.4
export JAVA_HOME
case "$1" in
  'start_msg')
  echo "Starting up Tomcat"
  ;;
  'stop_msg')
  echo "Shutting down Tomcat"
  ;;
  'start')
  $CATALINA_HOME/bin/startup.sh
  ;;
  'stop')
  $CATALINA_HOME/bin/shutdown.sh
  ;;
  *)
  echo "Usage: $0 [start | stop]"
esac

I would appreciate very much if anyone can give me some clue on how to
make it work. Thanks in advance.

Eric
©2008 junlu.com - Jax Systems, LLC, U.S.A.