From 8fe93add81490986b2003e291189d559527cf07d Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 06:15:15 +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 | 6 +++--- shell/savePid | 2 +- shell/updateRisk | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/killNode b/shell/killNode index dd7c9aa..d7eda0d 100644 --- a/shell/killNode +++ b/shell/killNode @@ -1,13 +1,13 @@ #!/bin/sh #杀死进程 -if [ -e $1.pid ] +if [ -e run.pid ] then - p=`cat $1.pid` + p=`cat run.pid` kill -9 $p if [ $? -eq 0 ] then echo "成功杀死进程:$p" - rm -f pid + rm -f run.pid fi fi ./run.sh diff --git a/shell/savePid b/shell/savePid index d130fd8..5ecb1f3 100644 --- a/shell/savePid +++ b/shell/savePid @@ -11,7 +11,7 @@ while true sleep $second else echo "端口:$1的pid:$pid" - echo $pid>$1.pid + echo $pid>run.pid break fi done diff --git a/shell/updateRisk b/shell/updateRisk index c2d3afe..de1fb3d 100644 --- a/shell/updateRisk +++ b/shell/updateRisk @@ -23,7 +23,7 @@ function run(){ then git clone git@gogs.kirito.cool:panqihua/$1.git fi - cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode $1 + cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode } run $1