From 7b8bd4aa244670eb81ab6c7014d31b2c034c8690 Mon Sep 17 00:00:00 2001 From: Petro1990 Date: Fri, 13 Mar 2026 16:01:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=B5=D0=B1=D0=B0=D0=B3:=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=82=D0=BB?= =?UTF-8?q?=D0=B0=D0=B4=D0=BA=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=B0=D0=B2?= =?UTF-8?q?=D1=82=D0=BE=D0=BE=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20VPS=20(v1.0.7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rproxy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rproxy b/rproxy index db85447..26e1209 100644 --- a/rproxy +++ b/rproxy @@ -298,11 +298,13 @@ show_status() { find_vps_by_domain() { local dom="$1" + msg "Отладка: Резолвлю $dom..." >&2 # Пытаемся получить IP через ping (BusyBox стиль) local ip=$(ping -c 1 "$dom" 2>/dev/null | grep -o "[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" | head -n 1) # Если не вышло, пробуем nslookup (парсим более надежно через grep -o) [ -z "$ip" ] && ip=$(nslookup "$dom" 2>/dev/null | grep "Address" | tail -n 1 | grep -o "[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" | head -n 1) + msg "Отладка: Получен IP: '$ip'" >&2 [ -z "$ip" ] && return 1 for f in "$VPS_DIR"/*.conf; do @@ -310,6 +312,7 @@ find_vps_by_domain() { ( VPS_HOST="" . "$f" + msg "Отладка: Сравниваю с VPS '$(basename "$f" .conf)' (HOST: $VPS_HOST)" >&2 if [ "$VPS_HOST" = "$ip" ]; then basename "$f" .conf exit 0