ProxMenux/scripts/menus/hw_grafics_menu.sh

68 lines
2.5 KiB
Bash
Raw Normal View History

2025-01-30 16:55:58 +01:00
#!/bin/bash
# ==========================================================
# ProxMenu - A menu-driven script for Proxmox VE management
# ==========================================================
# Author : MacRimi
# Copyright : (c) 2024 MacRimi
# License : MIT (https://raw.githubusercontent.com/MacRimi/ProxMenux/main/LICENSE)
# Version : 1.0
# Last Updated: 28/01/2025
# ==========================================================
2025-01-31 22:02:33 +01:00
# Configuration ============================================
2025-01-30 16:55:58 +01:00
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
BASE_DIR="/usr/local/share/proxmenux"
2025-02-01 08:52:19 +01:00
UTILS_FILE="$BASE_DIR/utils.sh"
2025-01-30 16:55:58 +01:00
VENV_PATH="/opt/googletrans-env"
2025-02-01 08:52:19 +01:00
if [[ -f "$UTILS_FILE" ]]; then
source "$UTILS_FILE"
2025-01-30 16:55:58 +01:00
fi
2025-01-31 22:14:38 +01:00
load_language
2025-02-01 08:52:19 +01:00
initialize_cache
2025-01-31 22:02:33 +01:00
# ==========================================================
2025-01-30 16:55:58 +01:00
while true; do
2025-06-10 14:29:34 +02:00
OPTION=$(dialog --clear --backtitle "ProxMenux" --title "$(translate "GPUs and Coral-TPU Menu")" \
--menu "\n$(translate "Select an option:")" 20 70 8 \
"1" "$(translate "Add HW iGPU acceleration to an LXC")" \
"2" "$(translate "Add Coral TPU to an LXC")" \
"3" "$(translate "Install/Update Coral TPU on the Host")" \
"4" "$(translate "Return to Main Menu")" \
2>&1 >/dev/tty)
2025-01-30 16:55:58 +01:00
case $OPTION in
1)
2025-01-31 20:34:34 +01:00
bash <(curl -s "$REPO_URL/scripts/configure_igpu_lxc.sh")
2025-01-30 16:55:58 +01:00
if [ $? -ne 0 ]; then
2025-06-10 14:29:34 +02:00
clear
show_proxmenux_logo
2025-02-04 18:01:19 +01:00
msg_warn "$(translate "Operation cancelled.")"
2025-01-30 16:55:58 +01:00
sleep 2
fi
;;
2)
2025-01-31 20:34:34 +01:00
bash <(curl -s "$REPO_URL/scripts/install_coral_lxc.sh")
if [ $? -ne 0 ]; then
2025-06-10 14:29:34 +02:00
clear
show_proxmenux_logo
2025-02-04 18:01:19 +01:00
msg_warn "$(translate "Operation cancelled.")"
2025-01-31 20:34:34 +01:00
sleep 2
fi
;;
3)
bash <(curl -s "$REPO_URL/scripts/install_coral_pve.sh")
2025-01-30 16:55:58 +01:00
if [ $? -ne 0 ]; then
2025-06-10 14:29:34 +02:00
clear
show_proxmenux_logo
2025-02-04 18:01:19 +01:00
msg_warn "$(translate "Operation cancelled.")"
2025-01-30 16:55:58 +01:00
sleep 2
fi
;;
2025-01-31 22:02:33 +01:00
4) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;;
2025-01-30 16:55:58 +01:00
*) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;;
esac
done