Правки различные

This commit is contained in:
mi
2026-08-26 11:05:32 +03:00
parent c1e49fb15d
commit 728b9826a3
36 changed files with 722 additions and 1986 deletions
+29 -12
View File
@@ -36,18 +36,35 @@ else
fail "DNS не разрешает адреса репозиториев"
fi
for url in \
https://archive.ubuntu.com \
https://download.docker.com \
https://registry-1.docker.io \
https://github.com \
https://signoz.io; do
if curl -4fsSI --connect-timeout 8 --max-time 15 "$url" >/dev/null; then
ok "доступен $url"
else
fail "нет доступа к $url"
fi
done
probe_https() {
local label="$1"
local url="$2"
shift 2
local code
code="$(curl -4sS -o /dev/null -w '%{http_code}' \
--connect-timeout 8 --max-time 15 "$url" || true)"
local expected
for expected in "$@"; do
if [[ "$code" == "$expected" ]]; then
ok "доступен $label"
return 0
fi
done
fail "нет доступа к $label (HTTP ${code:-нет ответа})"
}
# Сайты отвечают 2xx/3xx. Docker Registry API на /v2/ без токена штатно
# отдаёт 401; корень registry-1.docker.io часто даёт 404 — это не отказ сети.
probe_https https://archive.ubuntu.com https://archive.ubuntu.com \
200 301 302 303 307 308
probe_https https://download.docker.com https://download.docker.com \
200 301 302 303 307 308
probe_https https://registry-1.docker.io https://registry-1.docker.io/v2/ \
200 401
probe_https https://github.com https://github.com \
200 301 302 303 307 308
probe_https https://signoz.io https://signoz.io \
200 301 302 303 307 308
echo
echo "=== Занятость портов ==="