From 76595e8865d44749445bc77fb8f820deed6099f9 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Sat, 30 Aug 2025 17:00:43 +0000 Subject: [PATCH] fix: duplicate auto-update prompt when answering No (addresses #391) - Set ENABLE_AUTO_UPDATES global variable when user responds in select_install_mode - Only ask about auto-updates once during installation - Fixed issue where answering No to auto-updates would prompt again later --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 205b31d67..f5c82c3af 100755 --- a/install.sh +++ b/install.sh @@ -235,6 +235,7 @@ create_lxc_container() { auto_updates_flag="" if [[ "$enable_updates" =~ ^[Yy]$ ]]; then auto_updates_flag="--enable-auto-updates" + ENABLE_AUTO_UPDATES=true # Set the global variable for host installations fi echo @@ -347,6 +348,7 @@ create_lxc_container() { auto_updates_flag="" if [[ "$enable_updates" =~ ^[Yy]$ ]]; then auto_updates_flag="--enable-auto-updates" + ENABLE_AUTO_UPDATES=true # Set the global variable for host installations fi # Optional VLAN configuration - defaults to empty (no VLAN) for regular users @@ -1873,8 +1875,9 @@ main() { fi fi - # Ask about auto-updates for fresh installation (unless forced by flag or in Docker/container) - if [[ "$ENABLE_AUTO_UPDATES" != "true" ]] && [[ "$IN_DOCKER" != "true" ]]; then + # Ask about auto-updates for fresh installation + # Skip if: already set by flag, in Docker, or being installed from host (IN_CONTAINER=true) + if [[ "$ENABLE_AUTO_UPDATES" != "true" ]] && [[ "$IN_DOCKER" != "true" ]] && [[ "$IN_CONTAINER" != "true" ]]; then echo echo "Enable automatic updates?" echo "Pulse can automatically install stable updates daily (between 2-6 AM)"