Files
ProxMenux/scripts/menus/main_menu.sh
T
MacRimiandClaude Opus 5 bcabcb618c feat(oci): run official container images as native LXC containers
Adds the OCI manager: an engine that turns a Docker Compose file into an
LXC definition, a catalog of 365 applications drawn from LinuxServer.io
and other container image sources, and a per-instance registry recording
what each container was built from. Reachable from the main menu.

Catalog text is translated like every other string in the project: the
taglines go through translate() and land in lang/*.json, so the entries
read in all eight languages instead of only English.

Translation cache builder:
- a failed translation leaves the key absent rather than writing English,
  which previously made the string count as translated forever
- a result identical to a 3+ word source is rejected, catching a provider
  that silently returns the text it was given
- strings that are nothing but glossary terms keep their source spelling
  instead of being discarded as failures
- no backoff between attempts when the provider is deterministic
- application names are protected so "HAOS One" survives translation
- argos joins the provider list, and the workflow reads the OCI sources

Audit & Report:
- findings that moved in the wrong direction between runs are reported
  alongside the ones that improved
- an accepted risk can carry a review date and is flagged when it falls due
- backup checks explain in plain language what they looked at and what to
  do next

Monitor:
- disks can be excluded from periodic reads, and an idle disk says so
  instead of showing a stale temperature
- per-disk identity survives a controller or enclosure change
- scheduled Borg backups resolve their SSH key from the repository entry
- PVE upgrades log the package list and the resulting dpkg changes

The web build no longer copies scripts/ into public/: the documentation
links to GitHub, so nothing read that folder.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 18:24:59 +02:00

108 lines
3.8 KiB
Bash

#!/bin/bash
# ==========================================================
# ProxMenux - A menu-driven script for Proxmox VE management
# ==========================================================
# Author : MacRimi
# Copyright : (c) 2024 MacRimi
# License : (GPL-3.0) (https://github.com/MacRimi/ProxMenux/blob/main/LICENSE)
# Version : 2.0
# Last Updated: 04/04/2025
# ==========================================================
# Configuration ============================================
LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts"
BASE_DIR="/usr/local/share/proxmenux"
UTILS_FILE="$BASE_DIR/utils.sh"
if ! command -v dialog &>/dev/null; then
apt update -qq >/dev/null 2>&1
apt install -y dialog >/dev/null 2>&1
fi
# ==========================================================
# The legacy "PVE9 + googletrans incompatible" gate that used to live
# here has been removed along with the googletrans runtime. Translations
# are now a static lookup against $BASE_DIR/lang/<lang>.json — there is
# no runtime venv to be incompatible with any PVE version.
if [[ -f "$UTILS_FILE" ]]; then
source "$UTILS_FILE"
fi
if [[ "$PROXMENUX_PVE9_WARNING_SHOWN" = "1" ]]; then
if ! load_language 2>/dev/null; then
LANGUAGE="en"
fi
else
load_language
initialize_cache
fi
# ==========================================================
show_menu() {
local TEMP_FILE
TEMP_FILE=$(mktemp)
while true; do
local menu_title="Main ProxMenux"
dialog --clear \
--backtitle "ProxMenux" \
--title "$(translate "$menu_title")" \
--menu "\n$(translate "Select an option:")" 22 70 14 \
1 "$(translate "Settings post-install Proxmox")" \
2 "$(translate "Hardware: GPUs and Coral-TPU")" \
3 "$(translate "Create VM from template or script")" \
4 "$(translate "Disk Manager")" \
5 "$(translate "Storage & Share Manager")" \
6 "$(translate "Proxmox VE Helper Scripts")" \
o "$(translate "OCI manager Apps (beta)")" \
7 "$(translate "Network Management")" \
8 "$(translate "Security")" \
9 "$(translate "Utilities and Tools")" \
b "$(translate "Host Backup & Restore")" \
h "$(translate "Help and Info Commands")" \
s "$(translate "Settings")" \
0 "$(translate "Exit")" 2>"$TEMP_FILE"
local EXIT_STATUS=$?
if [[ $EXIT_STATUS -ne 0 ]]; then
clear
msg_ok "$(translate "Thank you for using ProxMenux. Goodbye!")"
rm -f "$TEMP_FILE"
exit 0
fi
OPTION=$(<"$TEMP_FILE")
case $OPTION in
1) exec bash "$LOCAL_SCRIPTS/menus/menu_post_install.sh" ;;
2) exec bash "$LOCAL_SCRIPTS/menus/hw_grafics_menu.sh" ;;
3) exec bash "$LOCAL_SCRIPTS/menus/create_vm_menu.sh" ;;
4) exec bash "$LOCAL_SCRIPTS/menus/storage_menu.sh" ;;
5) exec bash "$LOCAL_SCRIPTS/menus/share_menu.sh" ;;
6) exec bash "$LOCAL_SCRIPTS/menus/menu_Helper_Scripts.sh" ;;
o) exec bash "$LOCAL_SCRIPTS/oci/oci_manager_apps.sh" ;;
7) exec bash "$LOCAL_SCRIPTS/menus/network_menu.sh" ;;
8) exec bash "$LOCAL_SCRIPTS/menus/security_menu.sh" ;;
9) exec bash "$LOCAL_SCRIPTS/menus/utilities_menu.sh" ;;
b) bash "$LOCAL_SCRIPTS/backup_restore/backup_host.sh" ;;
h) bash "$LOCAL_SCRIPTS/help_info_menu.sh" ;;
s) exec bash "$LOCAL_SCRIPTS/menus/config_menu.sh" ;;
0) clear; msg_ok "$(translate "Thank you for using ProxMenux. Goodbye!")"; rm -f "$TEMP_FILE"; exit 0 ;;
*) msg_warn "$(translate "Invalid option")"; sleep 2 ;;
esac
done
}
show_menu