linuxtomcat一键维护脚本(值得收藏) -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【meiwen.anslib.com - 电脑资料】

   

<span style="font-family: Arial, Helvetica, sans-serif;">#! /bin/sh</span>
a="/usr/share/tomcat7/webapps/ROOT"b="/usr/share/tomcat7/webapps/ROOT.war"c="ROOT.war"tomcat_stop="/usr/share/tomcat7/bin/shutdown.sh"sh "$tomcat_stop"ps aufx | grep tomcat | grep root | awk '{print $2}' | xargs kill -9rm -rf /usr/share/tomcat7/logs/catalina.outif [ -d "$a" ]; then	rm -r "$a"fiif [ -f "$b" ]; then        rm  "$b"fiif [ -f "$c" ]; then	cp "$c" "$b"fid="/usr/share/tomcat7/bin/startup.sh"sh "$d"sleep 10chmod +x work.sh

最新文章