#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
##
##  rc.tomcat -- Run-Commands for Tomcat 4.x
##

%config
    tomcat4_enable="yes"
    tomcat4_home="@l_prefix@/libexec/tomcat"

%start -p 200 -u @l_rusr@
    if opServiceEnabled tomcat4; then
        JAVA_HOME="$j2se_home"; export JAVA_HOME
        CATALINA_HOME="$tomcat4_home"; export CATALINA_HOME
        $CATALINA_HOME/bin/startup.sh
    fi

%stop -p 200 -u @l_rusr@
    if opServiceEnabled tomcat4; then
        JAVA_HOME="$j2se_home"; export JAVA_HOME
        CATALINA_HOME="$tomcat4_home"; export CATALINA_HOME
        $CATALINA_HOME/bin/shutdown.sh
    fi

%env
    if opServiceEnabled tomcat4; then
        CATALINA_HOME="$tomcat4_home"
        export CATALINA
    fi

