Tomcat开机启动脚本

#!/bin/bash  

# set JAVA_HOME    need set 
export JAVA_HOME=;

#set Apache Tomcat server path  
tomcat_path=

start()  {
        echo -n "Start tomcat:"
        $tomcat_path/bin/catalina.sh start
}  

stop(){  
        echo -n "Stop tomcat:"
        $tomcat_path/bin/catalina.sh stop
}  

#do command  
case "$1" in   
        start)  
         start  
         ;;  
        stop)  
         stop  
         ;;  
        restart)  
         stop  
         start  
         ;;  
        *)  
         echo "Use :$0 {start|stop|restart}"  
         ;;  
esac  
exit 0

发表评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注