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
+1 -2
View File
@@ -17,8 +17,7 @@ jobs:
chmod 644 ~/.ssh/known_hosts chmod 644 ~/.ssh/known_hosts
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key chmod 600 ~/.ssh/deploy_key
cat ~/.ssh/known_hosts ssh -o StrictHostKeyChecking=yes -i ~/.ssh/deploy_key deploy@${{ vars.DEPLOY_HOST }} deploy-nginx
ssh -v -o StrictHostKeyChecking=yes -i ~/.ssh/deploy_key deploy@${{ vars.DEPLOY_HOST }} deploy-nginx
test: test:
needs: deploy needs: deploy
+4
View File
@@ -90,6 +90,8 @@ if [ "$APP" = "nginx" ]; then
missing_certs=false missing_certs=false
for conf in /opt/hantim/docker/nginx/conf.d/*.conf; do for conf in /opt/hantim/docker/nginx/conf.d/*.conf; do
cert_name=$(basename "$conf" .conf) 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 if [ ! -d "/etc/letsencrypt/live/$cert_name" ]; then
missing_certs=true missing_certs=true
break break
@@ -100,6 +102,8 @@ if [ "$APP" = "nginx" ]; then
trap 'docker start nginx 2>/dev/null || true' EXIT trap 'docker start nginx 2>/dev/null || true' EXIT
for conf in /opt/hantim/docker/nginx/conf.d/*.conf; do for conf in /opt/hantim/docker/nginx/conf.d/*.conf; do
cert_name=$(basename "$conf" .conf) 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 if [ ! -d "/etc/letsencrypt/live/$cert_name" ]; then
domains=$(grep -oP 'server_name\s+\K[^;]+' "$conf" | tr ' ' '\n' | sort -u) domains=$(grep -oP 'server_name\s+\K[^;]+' "$conf" | tr ' ' '\n' | sort -u)
domain_args="" domain_args=""