From 65238ea53a83c9b4b3531069caaacfad659d74ba Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 03:41:22 +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/savePid | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/savePid b/shell/savePid index d926d7c..d763506 100644 --- a/shell/savePid +++ b/shell/savePid @@ -4,14 +4,14 @@ second=5s while true do - - if [ `findPortPid $1|wc -l` -eq 0 ] + pid=`findPortPid $1` + if [ `echo $pid|wc -l` -eq 0 ] then echo "没有找到端口:$1的pid,$second后重试" sleep $second else - echo "端口:$1的pid:`findPortPid $1`" - findPortPid $1>pid + echo "端口:$1的pid:`$pid`" + echo $pid>$1.pid break fi done