From f4c0211cbaae36409a5b72ae50f7ea7d35ad5d45 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Wed, 2 Jul 2025 18:36:30 +0200 Subject: [PATCH] Update utilities menu --- scripts/menus/utilities_menu.sh | 25 +++++++++++++++++++---- scripts/utilities/uup_dump_iso_creator.sh | 16 +++++++-------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/scripts/menus/utilities_menu.sh b/scripts/menus/utilities_menu.sh index 9378279..b21e759 100644 --- a/scripts/menus/utilities_menu.sh +++ b/scripts/menus/utilities_menu.sh @@ -47,12 +47,29 @@ initialize_cache fi ;; 3) - bash <(curl -s "$REPO_URL/scripts/utilities/proxmox_update.sh") - if [ $? -ne 0 ]; then - return + proxmox_update_msg="\n" + proxmox_update_msg+="$(translate "This script will update your Proxmox VE system with advanced options:")\n\n" + proxmox_update_msg+="• $(translate "Repairs and optimizes repositories")\n" + proxmox_update_msg+="• $(translate "Cleans duplicate or conflicting sources")\n" + proxmox_update_msg+="• $(translate "Switches to the free no-subscription repository")\n" + proxmox_update_msg+="• $(translate "Updates all Proxmox and Debian packages")\n" + proxmox_update_msg+="• $(translate "Installs essential packages if missing")\n" + proxmox_update_msg+="• $(translate "Checks for LVM and storage issues")\n" + proxmox_update_msg+="• $(translate "Performs automatic cleanup after updating")\n\n" + proxmox_update_msg+="$(translate "Do you want to proceed and run the Proxmox System Update?")" + + dialog --colors --backtitle "ProxMenux" --title "$(translate "Proxmox System Update")" \ + --yesno "$proxmox_update_msg" 20 70 + + dialog_result=$? + if [[ $dialog_result -eq 0 ]]; then + bash <(curl -s "$REPO_URL/scripts/utilities/proxmox_update.sh") + if [ $? -ne 0 ]; then + return + fi fi ;; 4) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; *) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; esac - done + done \ No newline at end of file diff --git a/scripts/utilities/uup_dump_iso_creator.sh b/scripts/utilities/uup_dump_iso_creator.sh index 1dbe142..712d64a 100644 --- a/scripts/utilities/uup_dump_iso_creator.sh +++ b/scripts/utilities/uup_dump_iso_creator.sh @@ -66,7 +66,7 @@ function get_destination_path() { ###################################### - user_path=$(dialog --inputbox "$(translate "Enter destination path for ISO file")" 10 80 "$default_path" 3>&1 1>&2 2>&3) + user_path=$(dialog --backtitle "ProxMenux" --inputbox "$(translate "Enter destination path for ISO file")" 10 80 "$default_path" 3>&1 1>&2 2>&3) ###################################### @@ -86,7 +86,7 @@ function get_destination_path() { echo "$user_path" return 0 else - dialog --msgbox "$(translate "Error: Cannot create directory") '$user_path'. $(translate "Please check permissions and try again.")" 8 60 + dialog --backtitle "ProxMenux" --msgbox "$(translate "Error: Cannot create directory") '$user_path'. $(translate "Please check permissions and try again.")" 8 60 continue fi @@ -96,7 +96,7 @@ function get_destination_path() { echo "$user_path" return 0 else - dialog --msgbox "$(translate "Error: No write permissions in directory") '$user_path'. $(translate "Please choose another path.")" 8 60 + dialog --backtitle "ProxMenux" --msgbox "$(translate "Error: No write permissions in directory") '$user_path'. $(translate "Please choose another path.")" 8 60 continue fi @@ -155,13 +155,13 @@ function run_uupdump_creator() { ###################################### DEFAULT_TMP="/root/uup-temp" - USER_INPUT=$(dialog --inputbox "Enter temporary folder path (default: $DEFAULT_TMP):" 10 60 "$DEFAULT_TMP" 3>&1 1>&2 2>&3) + USER_INPUT=$(dialog --backtitle "ProxMenux" --inputbox "Enter temporary folder path (default: $DEFAULT_TMP):" 10 60 "$DEFAULT_TMP" 3>&1 1>&2 2>&3) ###################################### if [[ $? -ne 0 ]]; then - return 1 + return fi @@ -194,13 +194,13 @@ function run_uupdump_creator() { ###################################### - UUP_URL=$(whiptail --inputbox "$(translate "Paste the UUP Dump URL here")" 10 90 3>&1 1>&2 2>&3) + UUP_URL=$(whiptail --backtitle "ProxMenux" --inputbox "$(translate "Paste the UUP Dump URL here")" 10 90 3>&1 1>&2 2>&3) ###################################### if [[ $? -ne 0 ]]; then - return 1 + return fi @@ -213,7 +213,7 @@ function run_uupdump_creator() { if [[ ! "$UUP_URL" =~ id=.+\&pack=.+\&edition=.+ ]]; then msg_error "$(translate "The URL does not contain the required parameters (id, pack, edition).")" sleep 2 - return 1 + return fi