From b26505d258186c436ee530e71120a6f1c7ff13f4 Mon Sep 17 00:00:00 2001 From: juewuy Date: Sat, 24 Oct 2026 18:16:45 +0800 Subject: [PATCH] =?UTF-8?q?~=E7=8E=B0=E5=9C=A8=E5=BD=93=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E8=87=AA=E5=90=AF=E6=A0=A1=E9=AA=8C=E6=97=B6=EF=BC=8C=E4=B9=9F?= =?UTF-8?q?=E4=BC=9A=E5=90=8C=E6=AD=A5=E7=A6=81=E7=94=A8=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=90=8E=E7=9A=84=E7=BD=91=E7=BB=9C=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/libs/start_wait.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/scripts/libs/start_wait.sh b/scripts/libs/start_wait.sh index 2daa7201..e8918b52 100644 --- a/scripts/libs/start_wait.sh +++ b/scripts/libs/start_wait.sh @@ -1,10 +1,15 @@ -i=1 -while [ -z "$test" -a "$i" -lt 30 ]; do - sleep 1 - if curl --version >/dev/null 2>&1; then - test=$(curl -s -H "Authorization: Bearer $secret" http://127.0.0.1:${db_port}/proxies | grep -o proxies) - else - test=$(wget -q --header="Authorization: Bearer $secret" -O - http://127.0.0.1:${db_port}/proxies | grep -o proxies) - fi - i=$((i + 1)) -done +if [ "$network_check" = "OFF" ]; then + #复用网络检查开关:禁用自启网络检查时,也跳过启动后的面板端口校验 + test=skip +else + i=1 + while [ -z "$test" ] && [ "$i" -lt 30 ]; do + sleep 1 + if curl --version >/dev/null 2>&1; then + test=$(curl -s -H "Authorization: Bearer $secret" http://127.0.0.1:${db_port}/proxies | grep -o proxies) + else + test=$(wget -q --header="Authorization: Bearer $secret" -O - http://127.0.0.1:${db_port}/proxies | grep -o proxies) + fi + i=$((i + 1)) + done +fi