diff --git a/shell/checkPort b/shell/checkPort index 05acad9..39c2249 100644 --- a/shell/checkPort +++ b/shell/checkPort @@ -2,7 +2,7 @@ # 检查客户端和服务端端口是否存在 #存在返回0否则返回1 source /app/riskenv -if [[ `/app/findPortPid $PORT|wc -l` -eq 1 && `/app/findPortPid $serverPort|wc -l` -eq 1 ]] +if [[ ! -z "`/app/findPortPid $PORT`" && ! -z "`/app/findPortPid $serverPort`" ]] then echo 0 else