diff --git a/shell/initRisk b/shell/initRisk index cbe0d7f..fc0dbf0 100644 --- a/shell/initRisk +++ b/shell/initRisk @@ -1,14 +1,10 @@ #!/bin/sh -#运行自动部署服务端 -node /app/RiskCloudRun/bin/www & #运行web服务端 updateRisk RiskCloudMock #运行web客户端 updateRisk RiskCloudFontend #运行openresty /usr/local/openresty/nginx/sbin/nginx - -jobs -#把自动部署服务端切换到前台进行,使容器不会停止运行 -fg %1 \ No newline at end of file +#运行自动部署服务端 +/app/RiskCloudRun/bin/www \ No newline at end of file diff --git a/shell/updateRisk b/shell/updateRisk index bff626c..76468de 100644 --- a/shell/updateRisk +++ b/shell/updateRisk @@ -22,11 +22,18 @@ function run(){ if [ ! -e $1 ] then git clone git@gogs.kirito.cool:panqihua/$1.git + isUpdate=0 + else + isUpdate=1 fi cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode - url="http://127.0.0.1:3000/finsh?name=$1" - echo "成功回调地址:$url" - curl $url + + if [ $isUpdate -eq 1 ] + then + url="http://127.0.0.1:3000/finsh?name=$1" + echo "成功回调地址:$url" + curl $url + fi } run $1