shell-

启动停止

http://www.cnblogs.com/bhlsheji/p/5277314.html

shell命令获取tomcat的进程号id

http://www.cnblogs.com/sliuworld/p/5431662.html

 

#!/bin/bash
export PROGRESS_HOME=/usr/local/scan_web/tomcat_progress
echo $PROGRESS_HOME
CATALINA_HOME_PROGRESS=${PROGRESS_HOME//\//\\\/}
echo $CATALINA_HOME_PROGRESS
exist=`ps -ef  | sed -n "/${CATALINA_HOME_PROGRESS}/p"`
echo $exist
if [ -n "$exist" ]; then
pid=`echo $exist | awk '{ print $2 }'`
echo $pid
kill -9 "$pid"
echo 'kill successful'
fi

  

posted @ 2016-08-22 21:39  纯粹的人  阅读(129)  评论(0编辑  收藏  举报