pid=$(ps axw -eo pid,command | grep "org.apache.catalina.startup.Bootstrap" | grep "start" | awk '{print $1}') if [ -z "$pid" ]; then echo "tomcat is not running" else echo "tomcat is detected and the pid is $pid" kill -9 $pid if [ -z $? ];then echo " tomcat ($pid) is killed ..." else echo "kill error ..." fi fi
Last modified 15 years ago
Last modified on Jul 6, 2009, 4:46:08 PM