tomcat startup script not working at boot

Tapas Mishra mightydreams at gmail.com
Thu Feb 17 12:09:32 UTC 2011


I am having problems in starting tomcat at boot time with an automated
script of mine.
The Tomcat I am using is 5.5 since Sakai installation of mine depends
on 5.5 version on any other version it will break.
So /opt/apache-tomcat-5.5.31 is where every thing is and in that
bin/startup.sh is what I am trying to start each time at boot.
After writing the script I have done update-rc.d defaults
and I checked from command line
/etc/init.d/tomcatstart
/etc/init.d/tomcat stop

does work
where myscript above refers to the script below

but the same does not work when I reboot the system.

#!/bin/bash
#
# tomcat
#
# chkconfig:
# description: Start up the Tomcat servlet engine.

# Source function library.
. /lib/lsb/init-functions

RETVAL=$?
CATALINA_HOME="/opt/apache-tomcat-5.5.31"

case "$1" in
start)
if [ -f $CATALINA_HOME/bin/startup.sh ];
then
echo $"Starting Tomcat"
/opt/apache-tomcat-5.5.31/bin/startup.sh

fi
;;
stop)
if [ -f $CATALINA_HOME/bin/shutdown.sh ];
then
echo $"Stopping Tomcat"
/opt/apache-tomcat-5.5.31/bin/shutdown.sh
fi
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
;;
esac
exit $RETVAL


any pointers?

-- 
http://mightydreams.blogspot.com




More information about the ubuntu-users mailing list