经常操作tomcat,有点繁琐,便写了个脚本
启动脚本:
sh /topapp/apache-tomcat/bin/startup.sh >/dev/null 2>&1 echo -e "\e[32m\e[1m [startup ok]\e[0m"
其中/topapp/apache-tomcat/这个路径是你tomcat的路径
2.关闭脚本
sh /topapp/apache-tomcat/bin/shutdown.sh >/dev/null 2>&1
echo -e "\e[32m\e[1m [shutdown ok]\e[0m"
3.重启脚本
#!/bin/sh
echo -e "\e[35m\e[1m +++++++++++++++++++++++++++++++++++++++ Stoping ++++++++++++++++++++++++++++++++++++++++++++\e[0m"
sh /topapp/apache-tomcat/bin/shutdown.sh >/dev/null 2>&1
echo -e "\e[32m\e[1m [shutdown ok]\e[0m"
echo -e "\e[35m\e[1m +++++++++++++++++++++++++++++++++++++++ Starting ++++++++++++++++++++++++++++++++++++++++++++\e[0m"
sh /topapp/apache-tomcat/bin/startup.sh >/dev/null 2>&1
echo -e "\e[32m\e[1m [startup ok]\e[0m"