diff --git a/shell/savePid b/shell/savePid index 5ecb1f3..f2b4af4 100644 --- a/shell/savePid +++ b/shell/savePid @@ -4,14 +4,13 @@ second=5s while true do - pid=`findPortPid $1` - if [ -z `echo $pid` ] + if [ -z "`findPortPid $1`" ] then echo "没有找到端口:$1的pid,$second后重试" sleep $second else - echo "端口:$1的pid:$pid" - echo $pid>run.pid + echo "端口:$1的pid:`findPortPid $1`" + echo `findPortPid $1`>run.pid break fi done