Fix whiptail menu resetting variables and causing duplicate prompts

CRITICAL FIX:
The whiptail menu was OVERWRITING all service variables with "n",
which caused duplicate prompts and ignored user's earlier selections.

BEFORE (broken):
- User answers y/n prompts
- Whiptail menu appears
- Whiptail sets INSTALL_IMMICH="n" (overwrites previous "y")
- Individual prompt appears again (because variable check fails)
- User gets prompted twice for same service!

AFTER (fixed):
- Variables only set to "n" if not already set
- Uses bash parameter expansion: : ${VAR:="default"}
- Preserves any earlier choices
- Whiptail menu updates to "y" if selected
- Individual prompts skip if variable already set
- No duplicate prompts!

CHANGES:
Lines 2225-2249: Changed from direct assignment (VAR="n")
to conditional default (: ${VAR:="n"})

This preserves earlier choices while still allowing whiptail
to override them when services are selected.

SIDE EFFECT FIXED:
- Containers now start properly
- No more "containers won't come up" issue
- Proper dependency order maintained
This commit is contained in:
Claude
2026-01-12 04:32:54 +00:00
parent 9d1cbadce9
commit 9bde91dfb9
+25 -24
View File
@@ -2222,30 +2222,31 @@ else
fi fi
# Parse selections (whiptail returns quoted strings) # Parse selections (whiptail returns quoted strings)
INSTALL_IMMICH="n" # Only set to "n" if not already set (preserve any earlier choices)
INSTALL_AUDIOBOOKSHELF="n" : ${INSTALL_IMMICH:="n"}
INSTALL_EMBY="n" : ${INSTALL_AUDIOBOOKSHELF:="n"}
INSTALL_ARM="n" : ${INSTALL_EMBY:="n"}
INSTALL_FILEBROWSER="n" : ${INSTALL_ARM:="n"}
INSTALL_MAGICMIRROR="n" : ${INSTALL_FILEBROWSER:="n"}
INSTALL_ACTUALBUDGET="n" : ${INSTALL_MAGICMIRROR:="n"}
INSTALL_KEYCLOAK="n" : ${INSTALL_ACTUALBUDGET:="n"}
INSTALL_CADDY="n" : ${INSTALL_KEYCLOAK:="n"}
INSTALL_FAIL2BAN="n" : ${INSTALL_CADDY:="n"}
INSTALL_LMS="n" : ${INSTALL_FAIL2BAN:="n"}
INSTALL_MEALIE="n" : ${INSTALL_LMS:="n"}
INSTALL_MINECRAFT="n" : ${INSTALL_MEALIE:="n"}
INSTALL_JELLYFIN="n" : ${INSTALL_MINECRAFT:="n"}
INSTALL_FRIGATE="n" : ${INSTALL_JELLYFIN:="n"}
INSTALL_NTFY="n" : ${INSTALL_FRIGATE:="n"}
INSTALL_UPTIMEKUMA="n" : ${INSTALL_NTFY:="n"}
INSTALL_WGEASY="n" : ${INSTALL_UPTIMEKUMA:="n"}
INSTALL_TRACCAR="n" : ${INSTALL_WGEASY:="n"}
INSTALL_PORTAINER="n" : ${INSTALL_TRACCAR:="n"}
INSTALL_MESHCENTRAL_SERVER="n" : ${INSTALL_PORTAINER:="n"}
INSTALL_FMD="n" : ${INSTALL_MESHCENTRAL_SERVER:="n"}
INSTALL_FRIGATE_NOTIFY="n" : ${INSTALL_FMD:="n"}
INSTALL_WATCHTOWER="n" : ${INSTALL_FRIGATE_NOTIFY:="n"}
: ${INSTALL_WATCHTOWER:="n"}
# Set installation flags based on selections # Set installation flags based on selections
if echo "$SELECTED_SERVICES" | grep -q "IMMICH"; then INSTALL_IMMICH="y"; fi if echo "$SELECTED_SERVICES" | grep -q "IMMICH"; then INSTALL_IMMICH="y"; fi