Files
ProxMenux/scripts/menus/share_menu.sh

85 lines
3.2 KiB
Bash
Raw Normal View History

2025-08-22 18:05:14 +02:00
#!/bin/bash
# ==========================================================
# ProxMenux - Network Storage Manager Menu
# ==========================================================
# Author : MacRimi
# Copyright : (c) 2024 MacRimi
# License : MIT
# Version : 1.2
# Last Updated: $(date +%d/%m/%Y)
# ==========================================================
# 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
# ==========================================================
while true; do
2025-09-01 18:45:14 +02:00
OPTION=$(dialog --colors --backtitle "ProxMenux" \
2025-09-02 18:43:27 +02:00
--title "$(translate "Mount and Share Manager")" \
2025-08-22 18:05:14 +02:00
--menu "\n$(translate "Select an option:")" 25 80 15 \
2025-09-04 20:34:43 +02:00
"" "\Z4──────────────────────── $(translate "HOST") ─────────────────────────\Zn" \
2025-09-04 20:12:24 +02:00
"1" "$(translate "Configure NFS shared on Host")" \
"2" "$(translate "Configure Samba shared on Host")" \
"3" "$(translate "Configure Local Shared on Host")" \
2025-09-04 20:34:43 +02:00
"" "\Z4──────────────────────── $(translate "LXC") ─────────────────────────\Zn" \
2025-09-04 20:12:24 +02:00
"4" "$(translate "Configure LXC Mount Points (Host ↔ Container)")" \
2025-09-03 12:25:35 +02:00
"" "" \
2025-09-04 20:12:24 +02:00
"5" "$(translate "Configure NFS Client in LXC (only privileged)")" \
"6" "$(translate "Configure Samba Client in LXC (only privileged)")" \
"7" "$(translate "Set up Samba Server in LXC (only privileged)")" \
2025-09-01 14:43:46 +02:00
"" "" \
2025-09-04 20:12:24 +02:00
"8" "$(translate "Help & Info (commands)")" \
2025-09-01 14:43:46 +02:00
"0" "$(translate "Return to Main Menu")" \
2>&1 >/dev/tty
) || { exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh"); }
case "$OPTION" in
lxctitle|hosttitle)
continue
;;
2025-08-22 18:05:14 +02:00
1)
2025-09-04 20:12:24 +02:00
bash <(curl -s "$REPO_URL/scripts/share/nfs_host_auto.sh")
2025-08-22 18:05:14 +02:00
;;
2)
2025-09-04 20:12:24 +02:00
bash <(curl -s "$REPO_URL/scripts/share/samba_host.sh")
2025-08-22 18:05:14 +02:00
;;
2025-09-01 14:43:46 +02:00
3)
2025-09-04 20:12:24 +02:00
bash <(curl -s "$REPO_URL/scripts/share/local-shared-manager.sh")
2025-09-01 14:43:46 +02:00
;;
4)
2025-09-04 20:12:24 +02:00
bash <(curl -s "$REPO_URL/scripts/share/lxc-mount-manager.sh")
2025-08-22 18:05:14 +02:00
;;
5)
2025-09-04 20:12:24 +02:00
bash <(curl -s "$REPO_URL/scripts/share/nfs_client.sh")
2025-09-01 14:43:46 +02:00
;;
2025-09-04 20:12:24 +02:00
6)
bash <(curl -s "$REPO_URL/scripts/share/samba_client.sh")
2025-08-22 18:05:14 +02:00
;;
2025-09-01 14:43:46 +02:00
7)
2025-09-04 20:12:24 +02:00
bash <(curl -s "$REPO_URL/scripts/share/samba.sh")
2025-09-01 14:43:46 +02:00
;;
2025-09-04 20:12:24 +02:00
8)
2025-08-22 18:10:34 +02:00
bash <(curl -s "$REPO_URL/scripts/share/commands_share.sh")
2025-08-22 18:05:14 +02:00
;;
2025-09-01 14:43:46 +02:00
0)
2025-08-22 18:05:14 +02:00
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")
;;
*)
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")
;;
esac
done