run tomcat as tomcat user in Ubuntu 8.04

Kaushal Shriyan kaushalshriyan at gmail.com
Wed Jan 21 15:42:26 UTC 2009


Hi

I am not able to start tomcat as tomcat user on ubutu 8.04 Linux,
Below is my start/stop script
Any ideas as what is going wrong ?


Thanks and Regards

Kaushal

###################################################################################################
#!/bin/sh
#
# Startup script for Tomcat

JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
export JAVA_HOME
CATALINA_OPTS="-Xms512m -Xmx10000m"
export CATALINA_OPTS
start_tomcat=/usr/local/apache-tomcat-5.5.27/bin/startup.sh
stop_tomcat=/usr/local/apache-tomcat-5.5.27/bin/shutdown.sh

start() {
        echo -n "Starting tomcat: "
        su -c ${start_tomcat} tomcat
        echo "done."
}
stop() {
        echo -n "Shutting down tomcat: "
        ${stop_tomcat}
        echo "done."
}

# See how we were called
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        sleep 10
        start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
esac

###################################################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090121/4cece8b7/attachment.html>


More information about the ubuntu-users mailing list