diff --git a/ct/debian.sh b/ct/debian.sh index 2a28d61..a3ea67c 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -13,8 +13,8 @@ var_disk="${var_disk:-2}" var_os="${var_os:-debian}" var_version="${var_version:-12}" var_unprivileged="${var_unprivileged:-1}" -var_fuse="${var_fuse:-1}" -var_tun="${var_tun:-1}" +var_fuse="${var_fuse:-yes}" +var_tun="${var_tun:-yes}" header_info "$APP" variables diff --git a/ct/kasm.sh b/ct/kasm.sh index 8d55db4..12dd572 100644 --- a/ct/kasm.sh +++ b/ct/kasm.sh @@ -13,8 +13,8 @@ var_disk="${var_disk:-30}" var_os="${var_os:-debian}" var_version="${var_version:-12}" var_unprivileged="${var_unprivileged:-1}" -var_fuse="${var_fuse:-1}" -var_tun="${var_tun:-1}" +var_fuse="${var_fuse:-yes}" +var_tun="${var_tun:-yes}" header_info "$APP" variables diff --git a/misc/build.func b/misc/build.func index 4dd4ae6..942634e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -244,8 +244,8 @@ base_settings() { SSH_AUTHORIZED_KEY="" TAGS="community-script;" UDHCPC_FIX="" - ENABLE_FUSE=="0" - ENABLE_TUN="0" + ENABLE_FUSE="no" + ENABLE_TUN="no" # Override default settings with variables from ct script CT_TYPE=${var_unprivileged:-$CT_TYPE} @@ -696,6 +696,13 @@ advanced_settings() { echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" fi + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE support?\nRequired for tools like rclone, mergerfs, AppImage, etc." 10 58); then + ENABLE_FUSE="yes" + else + ENABLE_FUSE="no" + fi + echo -e "${FUSE}${BOLD}${DGN}Enable FUSE Support: ${BGN}$ENABLE_FUSE${CL}" + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERBOSE="yes" else @@ -962,7 +969,7 @@ build_container() { FEATURES="nesting=1" fi - if [ "$ENABLE_FUSE" == "1" ]; then + if [ "$ENABLE_FUSE" == "yes" ]; then FEATURES="$FEATURES,fuse=1" fi @@ -1059,7 +1066,7 @@ EOF fi fi - if [ "$ENABLE_TUN" == "1" ]; then + if [ "$ENABLE_TUN" == "yes" ]; then cat <>"$LXC_CONFIG" lxc.cgroup2.devices.allow: c 10:200 rwm lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file diff --git a/misc/core.func b/misc/core.func index 8b03525..e71b9f9 100644 --- a/misc/core.func +++ b/misc/core.func @@ -154,6 +154,7 @@ icons() { ROOTSSH="${TAB}🔑${TAB}${CL}" CREATING="${TAB}🚀${TAB}${CL}" ADVANCED="${TAB}🧩${TAB}${CL}" + FUSE="${TAB}🗂️${TAB}${CL}" } # ------------------------------------------------------------------------------ diff --git a/tools/pve/pve-privilege-converter.sh b/tools/pve/pve-privilege-converter.sh index fdf3ea2..857a2bb 100644 --- a/tools/pve/pve-privilege-converter.sh +++ b/tools/pve/pve-privilege-converter.sh @@ -29,13 +29,12 @@ check_root() { select_container() { echo -e "\nChoose a Container to convert:\n" - IFS=$'\n' - lxc_list=$(pct list | awk '{if(NR>1)print $1 " " $3}') + mapfile -t lxc_list < <(pct list | awk 'NR > 1 {print $1, $3}') PS3="Enter number of container to convert: " - select opt in $lxc_list; do - if [ -n "$opt" ]; then - CONTAINER_ID=$(echo "$opt" | awk '{print $1}') - CONTAINER_NAME=$(echo "$opt" | awk '{print $2}') + + select opt in "${lxc_list[@]}"; do + if [[ -n "$opt" ]]; then + read -r CONTAINER_ID CONTAINER_NAME <<<"$opt" break else echo "Invalid selection. Try again." @@ -45,10 +44,12 @@ select_container() { select_backup_storage() { echo -e "Select backup storage (temporary vzdump location):" - backup_storages=$(pvesm status --content backup | awk '{if(NR>1)print $1}') - select opt in $backup_storages; do - if [ -n "$opt" ]; then - BACKUP_STORAGE=$opt + mapfile -t backup_storages < <(pvesm status --content backup | awk 'NR > 1 {print $1}') + local PS3="Enter number of backup storage: " + + select opt in "${backup_storages[@]}"; do + if [[ -n "$opt" ]]; then + BACKUP_STORAGE="$opt" break else echo "Invalid selection. Try again."