fix: SITE_DOMAIN not pre-filling FQDN prompts after wizard

Three fixes:
1. configure_caddy_for_service: remove the '!= example.com' filter that
   silently dropped any valid domain matching that string; now any non-empty
   SITE_DOMAIN is used as the default subdomain suggestion
2. load_site_config: trim leading/trailing whitespace from key and val so
   hand-edited .config files with extra spaces still parse correctly
3. setup.sh: call load_site_config after the site wizard saves so the
   in-memory values are guaranteed fresh for all subsequent service installs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LQJBvqzXeyuhhAcAA3Q5Wq
This commit is contained in:
Claude
2026-06-28 15:07:07 +00:00
parent c09dd775ea
commit 01979c52f0
2 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -231,7 +231,10 @@ if ! grep -q '^SITE_TZ=' "$DOCKER_DIR/.config" 2>/dev/null; then
echo " and Caddy network for every service — you type them once, not every time."
OFFER_CONFIG=""
prompt_yn "Configure site defaults now? (y/n):" "y" OFFER_CONFIG
[ "$OFFER_CONFIG" = "y" ] || [ "$OFFER_CONFIG" = "Y" ] && run_site_configure
if [ "$OFFER_CONFIG" = "y" ] || [ "$OFFER_CONFIG" = "Y" ]; then
run_site_configure
load_site_config # reload so subsequent service prompts see the new values
fi
fi
# 4) Offer Caddy first (most services proxy through it).