0.个人标记
caicongyang
1.脚本retomcat.sh
#!/bin/shpid=`ps aux |grep tomcat |grep -v grep |grep -v retomcat | awk '{print $2}'`echo $pidif [ -n "$pid" ]then{ echo =====kill tomcat ========== kill -9 $pid sleep 3 echo =========startup.sh ============= /usr/local/tomcat/bin/startup.sh}elseecho ===========startup.sh=============/usr/local/tomcat/bin/startup.shfi
2.能够将以上的脚本增加crontab 中定时运行
我的CSDN博客地址: