diff --git a/shell/updateRisk b/shell/updateRisk index 74d7941..29b44fe 100644 --- a/shell/updateRisk +++ b/shell/updateRisk @@ -22,7 +22,10 @@ function run(){ } #检查是否正在部署 -result=`ps -ef|grep updateRisk|awk 'NR>1{next}{print $1}'` +command ="ps -ef|grep "updateRisk $1"|awk 'NR>1{next}{print $1}'" +echo $command +result=${command} +echo $result if [ ! -z $result ] then echo '检测到自动部署进程在运行,直接kill掉'