From 3a1d22eebc6db2b3de595193caf35e66b256321d Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Tue, 27 Dec 2022 13:09:00 +0100 Subject: [PATCH] move mount over to use heavyscript library --- functions/mount.sh | 8 ++++---- truetool.sh | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/functions/mount.sh b/functions/mount.sh index 371c98d7..1e7137e3 100755 --- a/functions/mount.sh +++ b/functions/mount.sh @@ -63,7 +63,7 @@ do else echo -e "\nMounted\n$data_name" fi - echo -e "\nUnmount with:\nzfs set mountpoint=legacy $full_path && rmdir /mnt/heavyscript/$data_name\n\nOr use the Unmount All option\n" + echo -e "\nUnmount with:\nzfs set mountpoint=legacy $full_path && rmdir /mnt/truetool/$data_name\n\nOr use the Unmount All option\n" #Ask if user would like to mount something else while true @@ -89,7 +89,7 @@ do done ;; 2) - mapfile -t unmount_array < <(basename -a /mnt/heavyscript/* | sed "s/*//") + mapfile -t unmount_array < <(basename -a /mnt/truetool/* | sed "s/*//") [[ -z ${unmount_array[*]} ]] && echo "Theres nothing to unmount" && sleep 3 && continue for i in "${unmount_array[@]}" do @@ -98,9 +98,9 @@ do pvc=$(echo "$main" | awk '{print $3}') full_path=$(find /mnt/"$pool"/ix-applications/releases/"$app"/volumes/ -maxdepth 0 | cut -c 6-) zfs set mountpoint=legacy "$full_path""$pvc" - echo "$i unmounted" && rmdir /mnt/heavyscript/"$i" || echo "failed to unmount $i" + echo "$i unmounted" && rmdir /mnt/truetool/"$i" || echo "failed to unmount $i" done - rmdir /mnt/heavyscript + rmdir /mnt/truetool sleep 3 ;; *) diff --git a/truetool.sh b/truetool.sh index 956f675b..e76566cc 100755 --- a/truetool.sh +++ b/truetool.sh @@ -38,6 +38,8 @@ source includes/update_self.sh source functions/dns.sh # shellcheck source=functions/misc.sh source functions/misc.sh +# shellcheck source=functions/mount.sh +source functions/mount.sh #If no argument is passed, set flag to show menu if [[ -z "$*" || "-" == "$*" || "--" == "$*" ]]; then