update menu share

This commit is contained in:
MacRimi
2025-09-07 09:19:53 +02:00
parent 3b0d5b5eb7
commit 8d6b3d650f
2 changed files with 9 additions and 5 deletions

View File

@@ -232,6 +232,7 @@ create_nfs_export() {
show_proxmenux_logo show_proxmenux_logo
msg_title "$(translate "Create LXC server NFS")" msg_title "$(translate "Create LXC server NFS")"
sleep 2
select_mount_point || return select_mount_point || return

View File

@@ -40,7 +40,7 @@ select_privileged_lxc
select_mount_point() { select_mount_point() {
while true; do while true; do
METHOD=$(dialog --backtitle "ProxMenux" --title "$(translate "Select Folder")" \ METHOD=$(whiptail --backtitle "ProxMenux" --title "$(translate "Select Folder")" \
--menu "$(translate "How do you want to select the folder to share?")" 15 60 5 \ --menu "$(translate "How do you want to select the folder to share?")" 15 60 5 \
"auto" "$(translate "Select from folders inside /mnt")" \ "auto" "$(translate "Select from folders inside /mnt")" \
"manual" "$(translate "Enter path manually")" \ "manual" "$(translate "Enter path manually")" \
@@ -54,7 +54,7 @@ select_mount_point() {
auto) auto)
DIRS=$(pct exec "$CTID" -- find /mnt -maxdepth 1 -mindepth 1 -type d 2>/dev/null) DIRS=$(pct exec "$CTID" -- find /mnt -maxdepth 1 -mindepth 1 -type d 2>/dev/null)
if [[ -z "$DIRS" ]]; then if [[ -z "$DIRS" ]]; then
dialog --title "$(translate "No Folders")" --msgbox "$(translate "No folders found inside /mnt in the CT.")" 8 60 whiptail --title "$(translate "No Folders")" --msgbox "$(translate "No folders found inside /mnt in the CT.")" 8 60
continue continue
fi fi
@@ -64,7 +64,7 @@ select_mount_point() {
OPTIONS+=("$dir" "$name") OPTIONS+=("$dir" "$name")
done <<< "$DIRS" done <<< "$DIRS"
MOUNT_POINT=$(dialog --title "$(translate "Select Folder")" \ MOUNT_POINT=$(whiptail --title "$(translate "Select Folder")" \
--menu "$(translate "Choose a folder to share:")" 20 60 10 "${OPTIONS[@]}" 3>&1 1>&2 2>&3) --menu "$(translate "Choose a folder to share:")" 20 60 10 "${OPTIONS[@]}" 3>&1 1>&2 2>&3)
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
return 1 return 1
@@ -95,6 +95,11 @@ select_mount_point() {
create_share() { create_share() {
show_proxmenux_logo
msg_title "$(translate "Create Samba server service")"
sleep 2
select_mount_point || return select_mount_point || return
@@ -108,8 +113,6 @@ create_share() {
fi fi
fi fi
show_proxmenux_logo
msg_title "$(translate "Create Samba server service")"
if pct exec "$CTID" -- dpkg -s samba &>/dev/null; then if pct exec "$CTID" -- dpkg -s samba &>/dev/null; then