經過PID判斷tomcat是否運行

#!/bin/bashtomcat pid=$(ps -ef | grep tomcat | grep -v grep | awk '{print $2}')bash if [ "$pid"x = "x" ]; then awk   echo tomcat is stop grep else top   echo tomcat pid is $pidps   kill -9 $pid    ech
相關文章
相關標籤/搜索