Update storage_menu.sh

This commit is contained in:
MacRimi 2025-06-10 12:44:49 +02:00 committed by GitHub
parent f01c474536
commit 444002b006
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,39 +26,32 @@ initialize_cache
while true; do while true; do
OPTION=$(whiptail --title "$(translate "Disk and Storage Manager Menu")" --menu "$(translate "Select an option:")" 20 70 10 \ OPTION=$(dialog --clear --backtitle "ProxMenux" --title "$(translate "Disk and Storage Manager Menu")" \
--menu "\n$(translate "Select an option:")" 20 70 10 \
"1" "$(translate "Add Disk Passthrough to a VM")" \ "1" "$(translate "Add Disk Passthrough to a VM")" \
"2" "$(translate "Add Disk") Passthrough $(translate "to a LXC")" \ "2" "$(translate "Add Disk") Passthrough $(translate "to a LXC")" \
"3" "$(translate "Import Disk Image to a VM")" \ "3" "$(translate "Import Disk Image to a VM")" \
"4" "$(translate "Return to Main Menu")" 3>&1 1>&2 2>&3) "4" "$(translate "Return to Main Menu")" \
2>&1 >/dev/tty) # Redirect dialog output to stderr, and then capture it
case $OPTION in case $OPTION in
1) 1)
#show_proxmenux_logo
#msg_info2 "$(translate "Running script: Add Disk Passthrough to a VM")..."
clear clear
bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough.sh") bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough.sh")
;; ;;
2) 2)
#show_proxmenux_logo
#msg_info2 "$(translate "Running script: Add Disk Passthrough to a CT")..."
clear clear
bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough_ct.sh") bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough_ct.sh")
;; ;;
3) 3)
#show_proxmenux_logo
#msg_info2 "$(translate "Running script: Import Disk Image to a VM")..."
clear clear
bash <(curl -s "$REPO_URL/scripts/storage/import-disk-image.sh") bash <(curl -s "$REPO_URL/scripts/storage/import-disk-image.sh")
;; ;;
4) 4)
#show_proxmenux_logo
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")
;; ;;
*) *)
#show_proxmenux_logo
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")
;; ;;
esac esac
done done