From ae7ad3e8be5c6f5af0542a009519208b4f0b648a Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sat, 10 Oct 2020 03:39:00 +0800 Subject: [PATCH] init --- shell/updateRisk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/shell/updateRisk b/shell/updateRisk index ca04a2e..3474555 100644 --- a/shell/updateRisk +++ b/shell/updateRisk @@ -11,14 +11,15 @@ export apiServer=https://risk.kirito.cool function run(){ - isCreate=false if [ ! -e $1 ] then git clone git@gogs.kirito.cool:panqihua/$1.git - isCreate=true + isUpdate=false + else + isUpdate=true fi cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode - if [ isCreate ] + if [ $isUpdate ] then url="http://127.0.0.1:3000/finsh?name=$1" echo "成功回调地址:$url" @@ -27,7 +28,7 @@ function run(){ } #检查是否正在部署 -command ="ps -ef|grep "updateRisk $1"|awk 'NR>1{next}{print $1}'" +command ="ps -ef|grep 'updateRisk $1'|awk 'NR>1{next}{print $1}'" echo $command result=${command} echo $result