Update scrips and menu

This commit is contained in:
MacRimi 2025-02-24 23:44:47 +01:00
parent 303aa31a94
commit 1b132150bb
9 changed files with 2571 additions and 32 deletions

10
images/logos_txt/logo.txt Normal file
View File

@ -0,0 +1,10 @@
▆▄▂   ▂▄▆
▏ ▇▅▃▁ ▁▃▅▇ ▁
▏ ▂┈ ┈▆▄▂ ▂▄▆┈ ┈▂▄▆ 
▏ ▏▇▅▃▁ ┊ ▁▃▅▇ ▃▅▇
▏ ▏ ▄▂ ▆▄▂▄▆ ▂▄▆┈ ▉
▏ ▏▉ ▇▅▂▁▂▅▇ ┈▂ ▉
▏ ▏ ▅▃▁ ┈ ▁▃▅  ▉
▏ ▏  ▆▄▂▄▆    ▉
▏ ▏   ▉
▆▄▂▏  ▂▄▆

View File

@ -43,7 +43,7 @@ CONFIG_FILE="$BASE_DIR/config.json"
CACHE_FILE="$BASE_DIR/cache.json" CACHE_FILE="$BASE_DIR/cache.json"
UTILS_FILE="$BASE_DIR/utils.sh" UTILS_FILE="$BASE_DIR/utils.sh"
LOCAL_VERSION_FILE="$BASE_DIR/version.txt" LOCAL_VERSION_FILE="$BASE_DIR/version.txt"
MENU_SCRIPT="menu.sh" MENU_SCRIPT="menu"
VENV_PATH="/opt/googletrans-env" VENV_PATH="/opt/googletrans-env"
# Source utils.sh for common functions and styles # Source utils.sh for common functions and styles
@ -221,7 +221,7 @@ echo -e "${YW}╰─────────────────────
echo echo
echo -ne "${GN}" echo -ne "${GN}"
type_text "To run ProxMenu, simply execute this command in the console or terminal:" type_text "To run ProxMenu, simply execute this command in the console or terminal:"
echo -e "${YWB} menu.sh${CL}" echo -e "${YWB} menu${CL}"
echo echo

View File

@ -43,7 +43,7 @@ if [[ -f "$UTILS_FILE" ]]; then
fi fi
# ========================================================== # ==========================================================
show_proxmenu_logo "$YW" show_proxmenux_logo

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,6 @@
# Last Updated: 28/01/2025 # Last Updated: 28/01/2025
# ========================================================== # ==========================================================
# Description: # Description:
# Description:
# This script automates the process of importing disk images into Proxmox VE virtual machines (VMs), # This script automates the process of importing disk images into Proxmox VE virtual machines (VMs),
# making it easy to attach pre-existing disk files without manual configuration. # making it easy to attach pre-existing disk files without manual configuration.
# #

View File

@ -29,22 +29,24 @@ initialize_cache
show_menu() { show_menu() {
while true; do while true; do
OPTION=$(whiptail --title "$(translate "Main Menu")" --menu "$(translate "Select an option:")" 20 70 8 \ OPTION=$(whiptail --title "$(translate "Main Menu")" --menu "$(translate "Select an option:")" 20 70 8 \
"1" "$(translate "Hardware: GPUs and Coral-TPU")" \ "1" "$(translate "Settings post-install Proxmox")" \
"2" "$(translate "Hard Drives, Disk Images, and Storage")" \ "2" "$(translate "Hardware: GPUs and Coral-TPU")" \
"3" "$(translate "Essential Proxmox VE Helper-Scripts")" \ "3" "$(translate "Hard Drives, Disk Images, and Storage")" \
"4" "$(translate "Network")" \ "4" "$(translate "Essential Proxmox VE Helper-Scripts")" \
"5" "$(translate "Settings")" \ "5" "$(translate "Network")" \
"6" "$(translate "Exit")" 3>&1 1>&2 2>&3) "6" "$(translate "Settings")" \
"7" "$(translate "Exit")" 3>&1 1>&2 2>&3)
case $OPTION in case $OPTION in
1) exec bash <(curl -s "$REPO_URL/scripts/menus/hw_grafics_menu.sh") ;; 1) exec bash <(curl -s "$REPO_URL/scripts/customizable_post_install.sh") ;;
2) exec bash <(curl -s "$REPO_URL/scripts/menus/storage_menu.sh") ;; 2) exec bash <(curl -s "$REPO_URL/scripts/menus/hw_grafics_menu.sh") ;;
3) exec bash <(curl -s "$REPO_URL/scripts/menus/menu_Helper_Scripts.sh") ;; 3) exec bash <(curl -s "$REPO_URL/scripts/menus/storage_menu.sh") ;;
4) exec bash <(curl -s "$REPO_URL/scripts/repair_network.sh") ;; 4) exec bash <(curl -s "$REPO_URL/scripts/menus/menu_Helper_Scripts.sh") ;;
5) exec bash <(curl -s "$REPO_URL/scripts/menus/config_menu.sh") ;; 5) exec bash <(curl -s "$REPO_URL/scripts/repair_network.sh") ;;
6) clear; msg_ok "$(translate "Thank you for using ProxMenu. Goodbye!")"; exit 0 ;; 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 ;;
*) msg_warn "$(translate "Invalid option")"; sleep 2 ;; *) msg_warn "$(translate "Invalid option")"; sleep 2 ;;
esac esac

View File

@ -0,0 +1,79 @@
#!/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: 24/02/2025
# ==========================================================
# Configuration ============================================
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
BASE_DIR="/usr/local/share/proxmenux"
UTILS_FILE="$BASE_DIR/utils.sh"
VENV_PATH="/opt/googletrans-env"
if [[ -f "$UTILS_FILE" ]]; then
source "$UTILS_FILE"
fi
load_language
initialize_cache
# ==========================================================
# Define scripts array
scripts=(
"Customizable script post-installation|ProxMenux|bash <(curl -s $REPO_URL/scripts/customizable_post_install.sh)"
"Proxmox VE Post Install|Helper-Scripts|bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/post-pve-install.sh)\""
"xshok-proxmox Post install|fork xshok-proxmox|wget https://raw.githubusercontent.com/MacRimi/xshok-proxmox/master/install-post.sh -c -O install-post.sh && bash install-post.sh && rm install-post.sh"
)
show_menu() {
while true; do
HEADER=$(printf " %-52s %-20s" "$(translate "Name")" "$(translate "Repository")")
menu_items=()
for i in "${!scripts[@]}"; do
IFS='|' read -r name repository command <<< "${scripts[$i]}"
number=$((i+1))
padded_option=$(printf "%2d %-50s" "$number" "$(translate "$name")")
menu_items+=("$padded_option" "$repository")
done
menu_items+=("$(printf "%2d %-40s" "$((${#scripts[@]}+1))" "$(translate "Return to Main Menu")")" "")
script_selection=$(whiptail --title "$(translate "Post-Installation Scripts Menu")" \
--menu "\n$HEADER" 20 78 $((${#scripts[@]}+1)) \
"${menu_items[@]}" 3>&1 1>&2 2>&3)
if [ -n "$script_selection" ]; then
selected_number=$(echo "$script_selection" | awk '{print $1}')
if [ "$selected_number" = "$((${#scripts[@]}+1))" ]; then
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")
fi
index=$((selected_number - 1))
if [ $index -ge 0 ] && [ $index -lt ${#scripts[@]} ]; then
IFS='|' read -r name repository command <<< "${scripts[$index]}"
if whiptail --title "$(translate "Confirm Execution")" \
--yesno "$(translate "Are you sure you want to execute:") $name?" 10 60; then
msg_info2 "$(translate "Executing script:") $name"
eval "$command"
msg_ok "$(translate "Script completed.")"
msg_success "$(translate "Press Enter to return to the menu...")"
read -r
else
msg_info2 "$(translate "Script execution cancelled.")"
sleep 2
fi
fi
else
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")
fi
done
}
show_menu

View File

@ -214,5 +214,5 @@ show_main_menu() {
clear clear
show_proxmenu_logo "$YW" show_proxmenux_logo
show_main_menu show_main_menu

View File

@ -31,7 +31,7 @@ BASE_DIR="/usr/local/share/proxmenux"
CONFIG_FILE="$BASE_DIR/config.json" CONFIG_FILE="$BASE_DIR/config.json"
CACHE_FILE="$BASE_DIR/cache.json" CACHE_FILE="$BASE_DIR/cache.json"
LOCAL_VERSION_FILE="$BASE_DIR/version.txt" LOCAL_VERSION_FILE="$BASE_DIR/version.txt"
MENU_SCRIPT="menu.sh" MENU_SCRIPT="menu"
VENV_PATH="/opt/googletrans-env" VENV_PATH="/opt/googletrans-env"
@ -249,21 +249,101 @@ print(translate_text('$text', '$dest_lang'))
show_proxmenu_logo() { show_proxmenux_logo() {
local color="${1:-$GN}"
clear clear
echo -e "${color}"
cat << 'EOF'
██████╗ ██████╗ ██████╗ ██╗ ██╗███╗ ███╗███████╗███╗ ██╗██╗ ██╗██╗ ██╗
██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝████╗ ████║██╔════╝████╗ ██║██║ ██║╚██╗██╔╝
██████╔╝██████╔╝██║ ██║ ╚███╔╝ ██╔████╔██║█████╗ ██╔██╗ ██║██║ ██║ ╚███╔╝
██╔═══╝ ██╔══██╗██║ ██║ ██╔██╗ ██║╚██╔╝██║██╔══╝ ██║╚██╗██║██║ ██║ ██╔██╗
██║ ██║ ██║╚██████╔╝██╔╝ ██╗██║ ╚═╝ ██║███████╗██║ ╚████║╚██████╔╝██╔╝ ██╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝
- A menu-driven script for Proxmox VE management - if [[ -z "$SSH_TTY" && -z "$(who am i | awk '{print $NF}' | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}')" ]]; then
# Logo for terminal noVNC
BOLD="\033[1m"
NEON_PURPLE_BLUE="\033[38;5;99m"
WHITE="\033[38;5;15m"
RESET="\033[0m"
# Logo ASCII
LOGO=$(cat << "EOF"
\e[0m\e[38;2;61;61;61m▆\e[38;2;60;60;60m▄\e[38;2;54;54;54m▂\e[0m \e[38;2;0;0;0m \e[0m \e[38;2;54;54;54m▂\>
\e[38;2;59;59;59;48;2;62;62;62m▏ \e[38;2;61;61;61;48;2;37;37;37m▇\e[0m\e[38;2;60;60;60m▅\e[38;2;56;56;56m▃\e[38;2;37>
\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[7m\e[38;2;61;61;61m▂\e[0m\e[38;2;62;62;62;48;2;61;61;61m┈\e[48;2;62;62;62m >
\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[7m\e[38;2;39;39;39m▇\e[38;2;57;57;57m▅\e[38;2;60;60;60m▃\>
\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[0m \e[38;2;203;63;2m▄\e[38;2;147;45;1m▂\e[0m \e[7m\e[38;2>
\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[7m\e[38;2;121;37;1m▉\e[0m\e[38;2;0;0;0;48;2;231;72;3m \e>
\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[0m \e[7m\e[38;2;190;59;2m▅\e[38;2;216;67;2m▃\e[38;2;225;7>
\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏ \e[0m \e[7m\e[38;2;172;53;1m▆\e[38;2;213;66;2m▄\e[38;2;21>
\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏ \e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231>
\e[7m\e[38;2;52;52;52m▆\e[38;2;59;59;59m▄\e[38;2;61;61;61m▂\e[0m\e[38;2;31;31;31m▏ \e[0m \e[7m\e[38;2;228>
EOF EOF
echo -e "${CL}" )
TEXT=(
""
""
"${BOLD}ProxMenux${RESET}"
""
"${BOLD}${NEON_PURPLE_BLUE}A menu-driven script for${RESET}"
"${BOLD}${NEON_PURPLE_BLUE}Proxmox VE management${RESET}"
""
""
""
""
)
mapfile -t logo_lines <<< "$LOGO"
for i in {0..9}; do
echo -e "${logo_lines[i]} ${WHITE}${RESET} ${TEXT[i]}"
done
else
# Logo for terminal SSH
DARK_GRAY="\033[38;5;244m"
ORANGE="\033[38;5;202m"
BOLD="\033[1m"
NEON_PURPLE_BLUE="\033[38;5;99m"
WHITE="\033[38;5;15m"
RESET="\033[0m"
TEXT=(
""
""
""
""
"${BOLD}ProxMenux${RESET}"
""
"${BOLD}${NEON_PURPLE_BLUE}A menu-driven script for${RESET}"
"${BOLD}${NEON_PURPLE_BLUE}Proxmox VE management${RESET}"
""
""
""
""
""
""
)
LOGO=(
"${DARK_GRAY}░░░░ ░░░░${RESET}"
"${DARK_GRAY}░░░░░░░ ░░░░░░ ${RESET}"
"${DARK_GRAY}░░░░░░░░░░░ ░░░░░░░ ${RESET}"
"${DARK_GRAY}░░░░ ░░░░░░ ░░░░░░ ${ORANGE}░░${RESET}"
"${DARK_GRAY}░░░░ ░░░░░░░ ${ORANGE}░░▒▒▒${RESET}"
"${DARK_GRAY}░░░░ ░░░ ${ORANGE}░▒▒▒▒▒▒▒${RESET}"
"${DARK_GRAY}░░░░ ${ORANGE}▒▒▒░ ░▒▒▒▒▒▒▒▒▒▒${RESET}"
"${DARK_GRAY}░░░░ ${ORANGE}░▒▒▒▒▒ ▒▒▒▒▒░░ ▒▒▒▒${RESET}"
"${DARK_GRAY}░░░░ ${ORANGE}░░▒▒▒▒▒▒▒░░ ▒▒▒▒${RESET}"
"${DARK_GRAY}░░░░ ${ORANGE}░░░ ▒▒▒▒${RESET}"
"${DARK_GRAY}░░░░ ${ORANGE}▒▒▒▒${RESET}"
"${DARK_GRAY}░░░░ ${ORANGE}▒▒▒░${RESET}"
"${DARK_GRAY} ░░ ${ORANGE}░░ ${RESET}"
)
for i in {0..12}; do
echo -e "${LOGO[i]} ${WHITE}${RESET} ${TEXT[i]}"
done
fi
} }