From d6bd1ee215c1eac6112c5cbda0fc32145142b7d6 Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Thu, 30 Apr 2026 10:22:28 -0400 Subject: [PATCH] fix(install): prevent weather and music from auto-installing on fresh install (#318) * fix(install): remove weather and music credential stubs from secrets template config_secrets.template.json shipped ledmatrix-weather and music as top-level keys; config_manager deep-merges secrets into the main config on load, so the reconciler treated them as plugin config entries and auto-installed both plugins on first web UI visit after a fresh install. Remove both keys from the template and clear the inline fallback block in first_time_install.sh so new installs start clean. Co-Authored-By: Claude Sonnet 4.6 * fix(install): sync fallback secrets with template structure The fallback block (used when config_secrets.template.json is missing) was an empty object after the weather/music keys were removed. Mirror the current template so youtube and github placeholders are always present regardless of whether the template file exists. Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Chuck Co-authored-by: Claude Sonnet 4.6 --- config/config_secrets.template.json | 10 +--------- first_time_install.sh | 10 +++++++--- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/config/config_secrets.template.json b/config/config_secrets.template.json index d42de957..61909876 100644 --- a/config/config_secrets.template.json +++ b/config/config_secrets.template.json @@ -1,17 +1,9 @@ { - "ledmatrix-weather": { - "api_key": "YOUR_OPENWEATHERMAP_API_KEY" - }, "youtube": { "api_key": "YOUR_YOUTUBE_API_KEY", "channel_id": "YOUR_YOUTUBE_CHANNEL_ID" }, - "music": { - "SPOTIFY_CLIENT_ID": "YOUR_SPOTIFY_CLIENT_ID_HERE", - "SPOTIFY_CLIENT_SECRET": "YOUR_SPOTIFY_CLIENT_SECRET_HERE", - "SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8888/callback" - }, "github": { "api_token": "YOUR_GITHUB_PERSONAL_ACCESS_TOKEN" } -} \ No newline at end of file +} \ No newline at end of file diff --git a/first_time_install.sh b/first_time_install.sh index b080c179..a1a792a3 100644 --- a/first_time_install.sh +++ b/first_time_install.sh @@ -599,9 +599,13 @@ if [ ! -f "$PROJECT_ROOT_DIR/config/config_secrets.json" ]; then echo "⚠ Template config/config_secrets.template.json not found; creating a minimal secrets file" cat > "$PROJECT_ROOT_DIR/config/config_secrets.json" <<'EOF' { - "weather": { - "api_key": "YOUR_OPENWEATHERMAP_API_KEY" - } + "youtube": { + "api_key": "YOUR_YOUTUBE_API_KEY", + "channel_id": "YOUR_YOUTUBE_CHANNEL_ID" + }, + "github": { + "api_token": "YOUR_GITHUB_PERSONAL_ACCESS_TOKEN" + } } EOF # Check if service runs as root and set ownership accordingly