fix(script): improve regex to avoid matching proxy_ssl_server_name

This commit is contained in:
João Pedro Toledo Goncalves 2026-01-27 09:07:52 -03:00
parent 5a50089d5c
commit 9c4aee8c86
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ for conf in /etc/nginx/conf.d/*.conf; do
echo "[Pre-Flight] Checking config: $conf"
# Simple extraction of server_name (naive, but works for standard configs)
DOMAINS=$(grep -E "\s*server_name\s+" "$conf" | sed -r 's/.*server_name\s+(.*);/\1/')
DOMAINS=$(grep -E "^\s*server_name\s+" "$conf" | sed -r 's/.*server_name\s+(.*);/\1/')
for domain in $DOMAINS; do
if [ "$domain" = "_" ] || [ "$domain" = "localhost" ]; then continue; fi