Update mermaids.sh

This commit is contained in:
Dan 2026-04-16 23:55:53 +08:00
parent fb7e4b0e60
commit ff47e4ea57

View File

@ -154,16 +154,18 @@ PORT="${1:-80}"
log "Fixing Debian CDN routing..." log "Fixing Debian CDN routing..."
# Try AdGuard's CDN node first # Try AdGuard's CDN node first
if curl -sf http://146.75.22.132/debian/dists/bookworm/Release >/dev/null 2>&1; then # if curl -sf http://146.75.22.132/debian/dists/bookworm/Release >/dev/null 2>&1; then
sed -i "s|http://deb.debian.org|http://146.75.22.132|g" /etc/apt/sources.list sed -i "s|http://deb.debian.org|http://146.75.22.132|g" /etc/apt/sources.list
log "Using Fastly node: 146.75.22.132" log "Using Fastly node: 146.75.22.132"
# Fallback to Cloudflare's CDN node # # Fallback to Cloudflare's CDN node
elif curl -sf http://151.101.2.132/debian/dists/bookworm/Release >/dev/null 2>&1; then # elif curl -sf http://151.101.2.132/debian/dists/bookworm/Release >/dev/null 2>&1; then
sed -i "s|http://deb.debian.org|http://151.101.2.132|g" /etc/apt/sources.list # sed -i "s|http://deb.debian.org|http://151.101.2.132|g" /etc/apt/sources.list
log "Using Fastly node: 151.101.2.132" # log "Using Fastly node: 151.101.2.132"
else # else
warn "Both Fastly nodes unreachable — trying direct domain (may fail)" # warn "Both Fastly nodes unreachable — trying direct domain (may fail)"
fi # fi
apt-get update -o Acquire::Retries=3
log "Installing dependencies..." log "Installing dependencies..."
apt-get install -y -qq \ apt-get install -y -qq \