From c8e7ad6e54fece82dfc755f39be68235e378ebd1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:08:46 +0200 Subject: [PATCH] Update build.func --- misc/build.func | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/misc/build.func b/misc/build.func index b50cd1b5..1b39a80f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -977,8 +977,9 @@ install_script() { header_info while true; do - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \ - 20 60 7 \ + TMP_CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "SETTINGS" \ + --menu "Choose an option:" 20 60 7 \ "1" "Default Settings" \ "2" "Default Settings (with verbose)" \ "3" "Advanced Settings" \ @@ -986,13 +987,15 @@ install_script() { "5" "Manage Default Storage" \ "6" "Diagnostic Settings" \ "7" "Exit" \ - --default-item "1" 3>&1 1>&2 2>&3) + --default-item "1" 3>&1 1>&2 2>&3) || true - if [ $? -ne 0 ] || [ -z "$CHOICE" ]; then - echo -e "${CROSS}${RD}Menu canceled. Exiting.${CL}" + if [ -z "$TMP_CHOICE" ]; then + echo -e "\n${CROSS}${RD}Menu canceled (ESC pressed). Exiting script.${CL}\n" exit 0 fi + CHOICE="$TMP_CHOICE" + case $CHOICE in 1) header_info