skip default server block in cert issuance, remove ssh debug lines

This commit is contained in:
2026-03-20 16:53:47 -04:00
parent 085b0bdd1b
commit 4b39eaaf06
2 changed files with 5 additions and 2 deletions
+4
View File
@@ -90,6 +90,8 @@ if [ "$APP" = "nginx" ]; then
missing_certs=false
for conf in /opt/hantim/docker/nginx/conf.d/*.conf; do
cert_name=$(basename "$conf" .conf)
# skip catch-all default server blocks (server_name _)
grep -qP 'server_name\s+_\s*;' "$conf" && continue
if [ ! -d "/etc/letsencrypt/live/$cert_name" ]; then
missing_certs=true
break
@@ -100,6 +102,8 @@ if [ "$APP" = "nginx" ]; then
trap 'docker start nginx 2>/dev/null || true' EXIT
for conf in /opt/hantim/docker/nginx/conf.d/*.conf; do
cert_name=$(basename "$conf" .conf)
# skip catch-all default server blocks (server_name _)
grep -qP 'server_name\s+_\s*;' "$conf" && continue
if [ ! -d "/etc/letsencrypt/live/$cert_name" ]; then
domains=$(grep -oP 'server_name\s+\K[^;]+' "$conf" | tr ' ' '\n' | sort -u)
domain_args=""