From e4ab6eeb48236be2383ec9e10923047b95c1f93a Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 00:05:53 +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/checkPort | 4 ++-- shell/killNode | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/checkPort b/shell/checkPort index 3c4955e..abe9e22 100644 --- a/shell/checkPort +++ b/shell/checkPort @@ -1,6 +1,6 @@ #!/bin/sh -# 检查端口是否存在 - +# 检查客户端和服务端端口是否存在 +#存在返回0否则返回1 source riskenv if [[ `findPortPid $PORT|wc -l` -eq 1 && `findPortPid $serverPort|wc -l` -eq 1 ]] then diff --git a/shell/killNode b/shell/killNode index 49ad108..15d8c08 100644 --- a/shell/killNode +++ b/shell/killNode @@ -2,11 +2,11 @@ #杀死进程 if [ -e pid ] then - pid=`echo pid` - kill -9 $pid + p=`cat pid` + kill -9 $p if [ $? -eq 0 ] then - echo "kill $pid success" + echo "成功杀死进程:$p" rm -f pid fi fi