From fc557005300a9648afdb4d1cee8a20723b3859b7 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Fri, 22 Aug 2025 08:55:12 +0000 Subject: [PATCH] feat: auto-select update in non-interactive container mode - Detect non-TTY environments when running with --in-container - Automatically select appropriate update based on configured channel - Prevents hanging on menu prompt in ProxmoxVE deployments --- install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 35ee40941..8263149b8 100755 --- a/install.sh +++ b/install.sh @@ -923,7 +923,18 @@ main() { echo "${menu_option}) Cancel" local max_option=$menu_option - safe_read "Select option [1-${max_option}]: " choice + # In non-interactive container mode, auto-select update + if [[ "$IN_CONTAINER" == "true" ]] && ! test -t 0; then + print_info "Non-interactive mode detected. Auto-selecting update option." + # Select stable update by default, or RC if configured + if [[ "$UPDATE_CHANNEL" == "rc" ]] && [[ -n "$RC_VERSION" ]] && [[ "$RC_VERSION" != "$STABLE_VERSION" ]]; then + choice=2 # RC version + else + choice=1 # Stable version + fi + else + safe_read "Select option [1-${max_option}]: " choice + fi # Determine what action to take based on the dynamic menu local action=""