shell脚本重启tomcat
最近遇到了晚上10点要求重启tomcat,但我又不想守在机器前操作,直接找了个shell脚本让其定时重启tomcat,这样让我很轻松.
系统:centos 7.x(64位)
1.重启脚本
cat /root/soft_shell/retomcat.sh
#!/bin/bash
. /etc/profile
pid=`ps aux | grep tomcat | grep -v grep | grep -v retomcat | awk '{print $2}'`
path="/usr/local/tomcat"
if [ -n...

