天高云淡 发表于 2018-12-7 09:46:11

Tomcat 重启服务器启动脚本

#!/bin/bash
# chkconfig: 345 10 90
# description: tomcat
#****************************************************
#descirption: start or stop the tomcat
# userage tomcat
#Author: james Lee
#Date: 2016-06-03
#
#****************************************************

tomcathome="/usr/local/tomcat8/bin"

#********************************Begin Start the shell************************************
case "$1" in
start)
echo-n " tomcat start:"
cd $tomcathome
./startup.sh
echo " Finished!!!!!!!!!"

;;
stop)

cd $tomcathome
./shutdown.sh
echo "Stop Finished.................."

;;
reload|restart)
cd $tomcathome
./shutdown.sh
sleep 10
./startup.sh

;;
*)
echo "Usage: tomcat "
exit 1
esac
exit 0  复制文件到/etc/init.d/
  

  chkconfig --add tomcat



页: [1]
查看完整版本: Tomcat 重启服务器启动脚本