Files
ProxMenux/scripts/menus/share_menu.sh
T
MacRimi bcf13d71b2 share_menu: drop redundant Host-only sub-header
The HOST block already groups everything that runs on the host
side, so the secondary "Host-only resources" divider between item 4
and item 5 was visual noise — the user reading the menu sees two
HOST sub-titles back to back and has to wonder how items 1-4 differ
from item 5 in scope. They don't; items 1-4 register an external or
local resource as a Proxmox storage, item 5 creates a local shared
directory. Both are host-side actions.

While here, retitle item 5 from "Add Shared Directory on Host" to
"Create Shared Directory on Host" — items 1-4 add an existing
external/local resource, item 5 creates a new one.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 18:40:25 +02:00

105 lines
3.9 KiB
Bash

#!/bin/bash
# ==========================================================
# ProxMenux - Storage & Share Manager Menu
# ==========================================================
# Author : MacRimi
# Copyright : (c) 2024 MacRimi
# License : GPL-3.0
# https://github.com/MacRimi/ProxMenux/blob/main/LICENSE
# Version : 1.2
# ==========================================================
# Description:
# Dispatcher for the Storage & Share Manager menu. Two blocks:
# HOST (register external or local storage as Proxmox storage,
# plus the local shared directory helper) and LXC (bind mount
# manager, NFS / Samba client and server for privileged CTs).
# ==========================================================
# Configuration
LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts"
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
# ==========================================================
while true; do
OPTION=$(dialog --colors --backtitle "ProxMenux" \
--title "$(translate "Storage & Share Manager")" \
--menu "\n$(translate "Select an option:")" 28 78 17 \
"" "\Z4──────────────────────── HOST ─────────────────────────\Zn" \
"1" "$(translate "Add NFS share as Proxmox Storage")" \
"2" "$(translate "Add Samba share as Proxmox Storage")" \
"3" "$(translate "Add iSCSI Target as Proxmox Storage")" \
"4" "$(translate "Add Local Disk as Proxmox Storage")" \
"" "" \
"5" "$(translate "Create Shared Directory on Host")" \
"" "" \
"" "\Z4──────────────────────── LXC ─────────────────────────\Zn" \
"6" "$(translate "Configure LXC Mount Points (Host ↔ Container)")" \
"" "" \
"7" "$(translate "Configure NFS Client in LXC (only privileged)")" \
"8" "$(translate "Configure Samba Client in LXC (only privileged)")" \
"9" "$(translate "Configure NFS Server in LXC (only privileged)")" \
"10" "$(translate "Configure Samba Server in LXC (only privileged)")" \
"" "" \
"h" "$(translate "Help & Info (commands)")" \
"0" "$(translate "Return to Main Menu")" \
2>&1 >/dev/tty
) || { exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh"; }
case "$OPTION" in
lxctitle|hosttitle)
continue
;;
1)
bash "$LOCAL_SCRIPTS/share/nfs_host.sh"
;;
2)
bash "$LOCAL_SCRIPTS/share/samba_host.sh"
;;
3)
bash "$LOCAL_SCRIPTS/share/iscsi_host.sh"
;;
4)
bash "$LOCAL_SCRIPTS/share/disk_host.sh"
;;
5)
bash "$LOCAL_SCRIPTS/share/local-shared-manager.sh"
;;
6)
bash "$LOCAL_SCRIPTS/share/lxc-mount-manager_minimal.sh"
;;
7)
bash "$LOCAL_SCRIPTS/share/nfs_client.sh"
;;
8)
bash "$LOCAL_SCRIPTS/share/samba_client.sh"
;;
9)
bash "$LOCAL_SCRIPTS/share/nfs_lxc_server.sh"
;;
10)
bash "$LOCAL_SCRIPTS/share/samba_lxc_server.sh"
;;
h)
bash "$LOCAL_SCRIPTS/share/commands_share.sh"
;;
0)
exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh"
;;
*)
exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh"
;;
esac
done