ProxMenux/scripts/menus/main_menu.sh

60 lines
2.1 KiB
Bash
Raw Normal View History

2025-01-29 15:11:44 +01:00
#!/bin/bash
2025-01-29 20:09:22 +01:00
# ==========================================================
# 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:09:00 +01:00
# Configuration ============================================
2025-01-29 20:52:28 +01:00
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
2025-01-29 20:09:22 +01:00
BASE_DIR="/usr/local/share/proxmenux"
2025-02-01 08:44:34 +01:00
UTILS_FILE="$BASE_DIR/utils.sh"
2025-01-29 20:09:22 +01:00
VENV_PATH="/opt/googletrans-env"
2025-02-01 08:44:34 +01:00
if [[ -f "$UTILS_FILE" ]]; then
source "$UTILS_FILE"
2025-01-29 20:09:22 +01:00
fi
2025-02-01 08:44:34 +01:00
load_language
initialize_cache
2025-01-31 22:09:00 +01:00
# ==========================================================
2025-01-29 22:43:49 +01:00
2025-01-29 22:17:21 +01:00
show_menu() {
2025-02-25 19:01:50 +01:00
2025-01-29 20:09:22 +01:00
while true; do
2025-03-06 23:29:30 +01:00
OPTION=$(whiptail --title "$(translate "Main ProxMenux")" --menu "$(translate "Select an option:")" 20 70 8 \
2025-02-24 23:44:47 +01:00
"1" "$(translate "Settings post-install Proxmox")" \
"2" "$(translate "Hardware: GPUs and Coral-TPU")" \
"3" "$(translate "Hard Drives, Disk Images, and Storage")" \
"4" "$(translate "Essential Proxmox VE Helper-Scripts")" \
"5" "$(translate "Network")" \
"6" "$(translate "Settings")" \
"7" "$(translate "Exit")" 3>&1 1>&2 2>&3)
2025-01-29 20:09:22 +01:00
2025-01-29 15:11:44 +01:00
case $OPTION in
2025-02-25 01:58:16 +01:00
1) exec bash <(curl -s "$REPO_URL/scripts/menus/menu_post_install.sh") ;;
2025-02-24 23:44:47 +01:00
2) exec bash <(curl -s "$REPO_URL/scripts/menus/hw_grafics_menu.sh") ;;
3) exec bash <(curl -s "$REPO_URL/scripts/menus/storage_menu.sh") ;;
4) exec bash <(curl -s "$REPO_URL/scripts/menus/menu_Helper_Scripts.sh") ;;
5) exec bash <(curl -s "$REPO_URL/scripts/repair_network.sh") ;;
6) exec bash <(curl -s "$REPO_URL/scripts/menus/config_menu.sh") ;;
7) clear; msg_ok "$(translate "Thank you for using ProxMenu. Goodbye!")"; exit 0 ;;
2025-02-04 18:07:44 +01:00
*) msg_warn "$(translate "Invalid option")"; sleep 2 ;;
2025-01-29 15:11:44 +01:00
esac
2025-01-29 21:04:30 +01:00
2025-01-29 15:11:44 +01:00
done
2025-01-29 22:17:21 +01:00
}
2025-02-25 18:57:15 +01:00
show_proxmenux_logo
2025-01-29 22:17:21 +01:00
show_menu