fix(script): improve regex to avoid matching proxy_ssl_server_name
This commit is contained in:
parent
5a50089d5c
commit
9c4aee8c86
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue