# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid
#!/bin/sh
#
# chkconfig: - 85 40
# description: Starts and stops Tomcat


TOMCAT_HOME=/opt/apache-tomcat-7.0.26
CATALINA_OPTS="-Xmx256M -Xms256M"

export CATALINA_OPTS

case $1 in
    start)
        sh ${TOMCAT_HOME}/bin/startup.sh
        ;;
    stop)
        sh ${TOMCAT_HOME}/bin/shutdown.sh
        ;;
    restart)
        sh ${TOMCAT_HOME}/bin/shutdown.sh
        sh ${TOMCAT_HOME}/bin/startup.sh
        ;;
        esac
exit 0
