menu update

This commit is contained in:
David Schroeder
2026-09-24 19:22:04 -05:00
parent cd4d505064
commit 6f4c95e0f2
11 changed files with 938 additions and 89 deletions
+74 -67
View File
@@ -23,6 +23,7 @@ source /opt/idssys/ta-proxmenu/inc/deploy-iso-nfs-lxc.sh
source /opt/idssys/ta-proxmenu/inc/deploy-pulse-lxc.sh
source /opt/idssys/ta-proxmenu/inc/virtio-helpers.inc
source /opt/idssys/ta-proxmenu/inc/ui.inc
source /opt/idssys/ta-proxmenu/inc/notifications.inc
ACTION_REQUESTED=0
[[ -n "${action:-}" ]] && ACTION_REQUESTED=1
@@ -2237,9 +2238,9 @@ TAPM_POST_VZDUMP_APPLY() {
TAPM_POST_VZDUMP_MENU() {
local -a labels=(
"Use Proxmox defaults — recommended"
"Maximum throughput — unlimited, ionice 5"
"Set a custom bandwidth limit"
"Restore a TAPM configuration backup"
"Unlimited backup bandwidth (I/O priority 5)"
"Set backup bandwidth and I/O priority"
"Restore a TAPM host configuration backup"
)
local -a values=(defaults maximum custom restore)
local confirmation
@@ -2247,7 +2248,7 @@ TAPM_POST_VZDUMP_MENU() {
local bandwidth_kib
local ionice
SELECT_MENU "Configure vzdump Performance" labels values
SELECT_MENU "Proxmox Backup Settings" labels values
case "$MENU_SELECTION" in
defaults)
TAPM_POST_VZDUMP_APPLY defaults
@@ -2255,7 +2256,7 @@ TAPM_POST_VZDUMP_MENU() {
maximum)
echo
echo -e "${idsCL[LightYellow]}This can saturate shared storage and increase guest latency.${idsCL[Default]}"
read -r -p " Enable maximum throughput (type yes to continue)? " confirmation
read -r -p " Enable unlimited backup bandwidth (type yes to continue)? " confirmation
[[ "${confirmation,,}" == yes ]] &&
TAPM_POST_VZDUMP_APPLY maximum
;;
@@ -2286,7 +2287,7 @@ TAPM_HOST_CONFIGURATION_MENU() {
while true; do
labels=(
"Audit current host"
"Audit TAPM host profile (read-only)"
"Apply/repair recommended TAPM profile"
"Customize TAPM profile"
)
@@ -2296,19 +2297,17 @@ TAPM_HOST_CONFIGURATION_MENU() {
values+=(migrate)
fi
labels+=(
"Configure vzdump performance"
"Restore a TAPM configuration backup"
"Restore a TAPM host configuration backup"
"View last configuration report"
)
values+=(vzdump restore report)
values+=(restore report)
SELECT_MENU "TAPM Host Configuration" labels values
SELECT_MENU "TAPM Host Profile" labels values
case "$MENU_SELECTION" in
audit) TAPM_POST_SHOW_AUDIT ;;
apply) TAPM_POST_APPLY_RECOMMENDED ;;
customize) TAPM_POST_CUSTOMIZE ;;
migrate) TAPM_POST_MIGRATE_PROXMENUX ;;
vzdump) TAPM_POST_VZDUMP_MENU ;;
restore) TAPM_POST_RESTORE_MENU ;;
report) TAPM_POST_SHOW_REPORT ;;
back) return ;;
@@ -2331,39 +2330,16 @@ SHOW_ABOUT() {
HOST_SETUP_MENU() {
local -a labels
local -a values
local -a values=("post_install" "services")
while true; do
labels=("TAPM Host Configuration")
values=("post_install")
labels=("TAPM Host Profile" "Proxmox service recovery")
TAPM_POST_PROXMENUX_DETECTED &&
labels[0]="TAPM Host Configuration — ProxMenux migration recommended"
labels+=("Analyze VM CPU migration compatibility")
values+=("cpu")
# Discover ISO storage only after the VirtIO submenu is selected.
labels+=("VirtIO driver downloads")
values+=("virtio")
command -v glances >/dev/null 2>&1 &&
labels+=("Glances CLI monitor (installed)") ||
labels+=("Install Glances CLI monitor")
values+=("glances")
if TAPM_OMSA_SUPPORTED_HARDWARE; then
TAPM_PACKAGE_INSTALLED srvadmin-all &&
labels+=("Dell OMSA - Legacy Dell Hosts (installed)") ||
labels+=("Install Dell OMSA - Legacy Dell Hosts")
values+=("omsa")
fi
SELECT_MENU "Host Setup" labels values
labels[0]="TAPM Host Profile — ProxMenux migration recommended"
SELECT_MENU "Host Configuration & Recovery" labels values
case "$MENU_SELECTION" in
post_install) TAPM_HOST_CONFIGURATION_MENU;;
cpu) DETECT_CPU;;
virtio) VIRTIO_MENU;;
glances) INSTALL_GLANCES;;
omsa) INSTALL_OMSA;;
services) SERVICE_RECOVERY_MENU;;
back) return;;
quit) EXIT1; exit 0;;
esac
@@ -2372,11 +2348,12 @@ HOST_SETUP_MENU() {
MONITORING_MENU() {
local -a labels
local -a values=("pulse" "rmm" "acronis" "sentinelone" "screenconnect")
local -a values
local cluster_resources
local pulse_status
while true; do
values=("pulse" "rmm" "acronis" "sentinelone" "screenconnect" "glances")
TAPM_PULSE_RESOURCE_INSTALLED_FROM_CONFIGS
pulse_status=$?
if (( pulse_status == 2 )); then
@@ -2387,37 +2364,48 @@ MONITORING_MENU() {
pulse_status=$?
fi
if (( pulse_status == 0 )); then
labels=("Pulse monitoring (installed)")
labels=("Deploy Pulse monitoring in an LXC container (installed)")
else
labels=($'Install \e[36mPulse\e[39m monitoring')
labels=("Deploy Pulse monitoring in an LXC container")
fi
if systemctl is-active --quiet ITSPlatform; then
labels+=("ConnectWise RMM agent (running)")
labels+=("Install ConnectWise RMM agent (running)")
else
labels+=($'Install \e[36mConnectWise RMM\e[39m agent')
fi
if dpkg-query -W -f='${Status}' cyberprotect 2>/dev/null |
grep -q "install ok installed"; then
labels+=("Acronis backup agent (installed)")
labels+=("Install Acronis backup agent (installed)")
else
labels+=($'Install \e[36mAcronis\e[39m backup agent')
fi
if dpkg-query -W -f='${Status}' sentinelagent 2>/dev/null |
grep -q "install ok installed"; then
labels+=("SentinelOne agent (installed)")
labels+=("Install SentinelOne endpoint security agent (installed)")
else
labels+=($'Install \e[36mSentinelOne\e[39m agent')
labels+=("Install SentinelOne endpoint security agent")
fi
if systemctl is-active --quiet 'connectwise*'; then
labels+=("ScreenConnect agent (running)")
labels+=("Install ScreenConnect remote access agent (running)")
else
labels+=($'Install \e[36mScreenConnect\e[39m agent')
labels+=("Install ScreenConnect remote access agent")
fi
command -v glances >/dev/null 2>&1 &&
labels+=("Install Glances CLI monitor (installed)") ||
labels+=("Install Glances CLI monitor")
if TAPM_OMSA_SUPPORTED_HARDWARE; then
labels+=("Install Dell OMSA hardware monitoring (legacy hosts)")
TAPM_PACKAGE_INSTALLED srvadmin-all && labels[-1]+=" (installed)"
values+=("omsa")
fi
labels+=("Proxmox Notifications")
values+=("notifications")
SELECT_MENU "Monitoring & Agents" labels values
case "$MENU_SELECTION" in
pulse) INSTALL_PULSE;;
@@ -2425,6 +2413,9 @@ MONITORING_MENU() {
acronis) INSTALL_ACRONIS;;
sentinelone) INSTALL_S1;;
screenconnect) INSTALL_SCREENCONNECT;;
glances) INSTALL_GLANCES;;
omsa) INSTALL_OMSA;;
notifications) TAPM_NOTIFICATIONS_MENU;;
back) return;;
quit) EXIT1; exit 0;;
esac
@@ -2449,7 +2440,7 @@ TAPM_ORPHAN_DISK_REPORT() {
CLUSTER_MENU() {
local -a labels
local -a values=("maintenance" "services" "keepalived" "iso_nfs" "orphan_disks")
local -a values=("maintenance" "cpu" "keepalived")
local maintenance_status
local node
@@ -2469,23 +2460,37 @@ CLUSTER_MENU() {
labels=("Enter maintenance mode and evacuate guests")
fi
labels+=("Proxmox service recovery")
labels+=("Review and apply cluster VM CPU baseline")
dpkg-query -W -f='${Status}' keepalived 2>/dev/null | grep -q "install ok installed" &&
labels+=("Deploy or reconfigure Keepalived (installed locally)") ||
labels+=("Deploy Keepalived on all cluster hosts")
labels+=("Create shared ISO storage")
labels+=("Find orphaned and unused disks [Read-only]")
labels+=("Configure cluster floating IP (Keepalived installed locally)") ||
labels+=("Configure cluster floating IP (Keepalived)")
SELECT_MENU "Cluster & Maintenance" labels values
SELECT_MENU "Cluster & High Availability" labels values
case "$MENU_SELECTION" in
maintenance) MAINTENANCE_MODE;;
services) SERVICE_RECOVERY_MENU;;
cpu) DETECT_CPU;;
keepalived) INSTALL_KEEPALIVE;;
back) return;;
quit) EXIT1; exit 0;;
esac
done
}
STORAGE_MENU() {
local -a labels=(
"Deploy shared ISO storage (NFS container)"
"Download Windows VirtIO driver ISOs"
"Report orphan candidates and unused disks (read-only)"
"Configure Proxmox backup bandwidth and I/O priority"
)
local -a values=("iso_nfs" "virtio" "orphan_disks" "vzdump")
while true; do
SELECT_MENU "Storage, ISOs & Backups" labels values
case "$MENU_SELECTION" in
iso_nfs) TAPM_DEPLOY_ISO_NFS_LXC; FINISH_ACTION;;
virtio) VIRTIO_MENU;;
orphan_disks) TAPM_ORPHAN_DISK_REPORT --interactive;;
iso_nfs)
TAPM_DEPLOY_ISO_NFS_LXC
FINISH_ACTION
;;
vzdump) TAPM_POST_VZDUMP_MENU;;
back) return;;
quit) EXIT1; exit 0;;
esac
@@ -2655,7 +2660,7 @@ BRANCH_MANAGEMENT_MENU() {
fi
while true; do
SELECT_MENU "Git Branch Management" labels values
SELECT_MENU "Switch TAPM Git Branch" labels values
case "$MENU_SELECTION" in
branch:*)
SWITCH_SCRIPT_BRANCH "${MENU_SELECTION#branch:}"
@@ -2695,11 +2700,11 @@ UTILITIES_MENU() {
last_checked="$(UPDATE_LAST_CHECKED_DISPLAY)"
labels+=(
"Check for updates "$'\e[2m'"(last checked: ${last_checked})"$'\e[22m'
"Switch Git branch"
"Switch TAPM Git branch"
"Version and installation information"
)
SELECT_MENU "TA-ProxMenu Management" labels values
SELECT_MENU "TAPM Management" labels values
case "$MENU_SELECTION" in
install_update)
if [[ "$UPDATE_STATUS" != "behind" ]]; then
@@ -2726,13 +2731,14 @@ UTILITIES_MENU() {
MAIN_MENU() {
local -a labels=(
"Host Setup"
"Host Configuration & Recovery"
"Monitoring & Agents"
"Cluster & Maintenance"
"TA-ProxMenu Management"
"Cluster & High Availability"
"Storage, ISOs & Backups"
"TAPM Management"
"Quit"
)
local -a values=("host" "monitoring" "cluster" "utilities" "quit")
local -a values=("host" "monitoring" "cluster" "storage" "utilities" "quit")
while true; do
SELECT_MENU "Main Menu" labels values 0
@@ -2740,6 +2746,7 @@ MAIN_MENU() {
host) HOST_SETUP_MENU;;
monitoring) MONITORING_MENU;;
cluster) CLUSTER_MENU;;
storage) STORAGE_MENU;;
utilities) UTILITIES_MENU;;
quit) EXIT1; exit 0;;
esac