[opencms-dev] AA Starting Tomcat under Linux

Ivan Codarin ivan.codarin at amm.uniud.it
Wed May 17 11:14:18 CEST 2006


Hi,
I have this file in /etc/init.d called tomcat5.
Try it if you want:


----- CUT HERE -------
#!/sbin/runscript

depend() {
        use dns logger mysql postgresql net
}

start() {
        #export CATALINA_BASE="/opt/tomcat5"
        export CATALINA_HOME="/opt/tomcat55"
        export JAVA_HOME="/opt/sun-jdk-1.5.0.03"
        export JRE_HOME="/opt/sun-jdk-1.5.0.03"
        export CATALINA_OUT="/var/log/tomcat55/catalina.log"
        echo "CATALINA_OUT:  $CATALINA_OUT"

        ebegin "Starting Tomcat 5.5.x"
        start-stop-daemon --start --quiet --chuid tomcat:tomcat --exec 
${CATALINA_HOME}/bin/catalina.sh -- ${TOMCAT_START}
        sleep 5
        eend $?
}

stop()  {

        #export CATALINA_BASE="/opt/tomcat5"
        export CATALINA_HOME="/opt/tomcat55"
        export JAVA_HOME="/opt/sun-jdk-1.5.0.03"
        export JRE_HOME="/opt/sun-jdk-1.5.0.03"

        ebegin "Stopping Tomcat  5.5.x"
        start-stop-daemon --start --quiet --chuid tomcat:tomcat --exec 
${CATALINA_HOME}/bin/catalina.sh -- ${TOMCAT_STOP}
        sleep 5
        eend $?
}

----- CUT HERE -------

it should be very general-purpose so it should work also on your Distribution.
I'm a gentoo user.

Ivan


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the opencms-dev mailing list