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