From bb5d9cc35fc714bec67ed06e12abe01511846cda Mon Sep 17 00:00:00 2001 From: Leon <62660101+Oreomeow@users.noreply.github.com> Date: Fri, 13 Aug 2021 15:29:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/sh/v2p.sh | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/Scripts/sh/v2p.sh b/Scripts/sh/v2p.sh index 2cfb17d..5af4233 100644 --- a/Scripts/sh/v2p.sh +++ b/Scripts/sh/v2p.sh @@ -224,23 +224,21 @@ check_port() { echo "正在检测端口:$1" netstat -tlpn | grep "\b$1\b" } -if [ "$port" != "2" ]; then - while check_port $V2P_PORT; do - echo -n -e "\e[31m端口:$V2P_PORT 被占用,请重新输入 webUI 端口:\e[0m" - read V2P_PORT - done - echo -e "\e[34m恭喜,端口:$V2P_PORT 可用\e[0m" - while check_port $HTTP_PORT; do - echo -n -e "\e[31m端口:$HTTP_PORT 被占用,请重新输入代理端口:\e[0m" - read HTTP_PORT - done - echo -e "\e[34m恭喜,端口:$HTTP_PORT 可用\e[0m" - while check_port $REQUEST_PORT; do - echo -n -e "\e[31m端口:$REQUEST_PORT 被占用,请重新输入代理请求端口:\e[0m" - read REQUEST_PORT - done - echo -e "\e[34m恭喜,端口:$REQUEST_PORT 可用\e[0m" -fi +while check_port $V2P_PORT; do + echo -n -e "\e[31m端口:$V2P_PORT 被占用,请重新输入 webUI 端口:\e[0m" + read V2P_PORT +done +echo -e "\e[34m恭喜,端口:$V2P_PORT 可用\e[0m" +while check_port $HTTP_PORT; do + echo -n -e "\e[31m端口:$HTTP_PORT 被占用,请重新输入代理端口:\e[0m" + read HTTP_PORT +done +echo -e "\e[34m恭喜,端口:$HTTP_PORT 可用\e[0m" +while check_port $REQUEST_PORT; do + echo -n -e "\e[31m端口:$REQUEST_PORT 被占用,请重新输入代理请求端口:\e[0m" + read REQUEST_PORT +done +echo -e "\e[34m恭喜,端口:$REQUEST_PORT 可用\e[0m" log "3.开始创建容器并执行"