ProxMenux/scripts/menus/hw_grafics_menu.sh

65 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-02-02 11:53:31 +01:00
OPTION=$(whiptail --title "$(translate "GPUs and Coral-TPU Menu")" --menu "$(translate "Select an option:")" 20 70 8 \
2025-01-31 22:02:33 +01:00
"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")" \
2025-01-31 20:34:34 +01:00
"4" "$(translate "Return to Main Menu")" 3>&1 1>&2 2>&3)
2025-01-30 16:55:58 +01:00
case $OPTION in
1)
echo -e "\033[33m[INFO] $(translate "Running script:") $(translate "HW iGPU LXC")...\033[0m"
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
msg_info "$(translate "Operation cancelled.")"
sleep 2
fi
;;
2)
echo -e "\033[33m[INFO] $(translate "Running script:") $(translate "Coral TPU LXC")...\033[0m"
2025-01-31 20:34:34 +01:00
bash <(curl -s "$REPO_URL/scripts/install_coral_lxc.sh")
if [ $? -ne 0 ]; then
msg_info "$(translate "Operation cancelled.")"
sleep 2
fi
;;
3)
2025-01-31 22:02:33 +01:00
echo -e "\033[33m[INFO] $(translate "Running script:") $(translate "Install/Update Coral")...\033[0m"
2025-01-31 20:34:34 +01:00
bash <(curl -s "$REPO_URL/scripts/install_coral_pve.sh")
2025-01-30 16:55:58 +01:00
if [ $? -ne 0 ]; then
msg_info "$(translate "Operation cancelled.")"
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