#!/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