From d25abefc3c0ade7a70b0059c1170bdf7af7ce127 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 06:00:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0openresty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/killNode | 4 ++-- shell/updateRisk | 12 +----------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/shell/killNode b/shell/killNode index 15d8c08..dd7c9aa 100644 --- a/shell/killNode +++ b/shell/killNode @@ -1,8 +1,8 @@ #!/bin/sh #杀死进程 -if [ -e pid ] +if [ -e $1.pid ] then - p=`cat pid` + p=`cat $1.pid` kill -9 $p if [ $? -eq 0 ] then diff --git a/shell/updateRisk b/shell/updateRisk index ae2eab4..c2d3afe 100644 --- a/shell/updateRisk +++ b/shell/updateRisk @@ -22,18 +22,8 @@ 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 - - if [ $isUpdate -eq 1 ] - then - url="http://127.0.0.1:3000/finsh" - echo "成功回调地址:$url" - curl -X POST -d "name=$1" $url - fi + cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode $1 } run $1