Switch Backto Main Menü and Exit Script

This commit is contained in:
CanbiZ 2025-11-27 15:33:16 +01:00
parent c58f808d62
commit f236fa0487

View File

@ -1913,18 +1913,18 @@ settings_menu() {
) )
if [ -f "$(get_app_defaults_path)" ]; then if [ -f "$(get_app_defaults_path)" ]; then
settings_items+=("3" "Edit App.vars for ${APP}") settings_items+=("3" "Edit App.vars for ${APP}")
settings_items+=("4" "Exit") settings_items+=("4" "← Back to Main Menu")
else else
settings_items+=("3" "Exit") settings_items+=("3" "← Back to Main Menu")
fi fi
local choice local choice
choice=$(whiptail --backtitle "Proxmox VE Helper Scripts" \ choice=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
--title "Community-Scripts SETTINGS Menu" \ --title "Community-Scripts SETTINGS Menu" \
--ok-button "OK" --cancel-button "Back" \ --ok-button "Select" --cancel-button "Exit Script" \
--menu "\n\nChoose a settings option:\n\nUse TAB or Arrow keys to navigate, ENTER to select." 20 60 9 \ --menu "\n\nChoose a settings option:\n\nUse TAB or Arrow keys to navigate, ENTER or SPACE to select." 20 60 9 \
"${settings_items[@]}" \ "${settings_items[@]}" \
3>&1 1>&2 2>&3) || break 3>&1 1>&2 2>&3) || exit_script
case "$choice" in case "$choice" in
1) diagnostics_menu ;; 1) diagnostics_menu ;;
@ -1933,12 +1933,12 @@ settings_menu() {
if [ -f "$(get_app_defaults_path)" ]; then if [ -f "$(get_app_defaults_path)" ]; then
nano "$(get_app_defaults_path)" nano "$(get_app_defaults_path)"
else else
# Exit was selected (no app.vars available) # Back was selected (no app.vars available)
return return
fi fi
;; ;;
4) 4)
# Exit - return to main menu # Back to main menu
return return
;; ;;
esac esac