vi /etc/init.d/tomcat
#!/bin/sh
export JAVA_HOME=/usr/local/jdk
export TOMCAT_HOME=/usr/local/tomcat
case "$1" in
start)
echo "tomcat gogo~"
$TOMCAT_HOME/bin/startup.sh
;;
stop)
echo "tomcat kill T_T"
$TOMCAT_HOME/bin/shutdown.sh
;;
restart)
echo "tomcat restart now"
$TOMCAT_HOME/bin/shutdown.sh
$TOMCAT_HOME/bin/startup.sh
;;
*)
echo "wow, tomcat!"
esac
댓글 없음:
댓글 쓰기