From fdf19626fac5beb7125fd6e50b23fab3758e4e5e Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Tue, 3 May 2022 21:38:10 -0600 Subject: [PATCH] better method of finding PVC_path --- heavy_script.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/heavy_script.sh b/heavy_script.sh index 18d5eb2f..74ea770a 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -80,8 +80,9 @@ do done data_name=$(echo "$pvc" | awk '{print $3}') mount=$(echo "$pvc" | awk '{print $4}') - path=$(find /*/*/ix-applications/releases/"$app"/volumes/ -maxdepth 0 | cut -c 6-) - echo -e "\nMounting\n""$path""""$mount""\nTo\n/mnt/temporary/$data_name" && zfs set mountpoint=/temporary/"$data_name" "$path""$mount" && echo -e "Mounted\n\nUnmount with the following command\nzfs set mountpoint=legacy ""$path"""$mount"\nOr use the Unmount All option" + volume_name=$(echo "$pvc" | awk '{print $4}') + full_path=$(zfs list | grep $volume_name | awk '{print $1}') + echo -e "\nMounting\n"$full_path"\nTo\n/mnt/temporary/$data_name" && zfs set mountpoint=/temporary/"$data_name" "$full_path" && echo -e "Mounted\n\nUnmount with the following command\nzfs set mountpoint=legacy "$full_path" && rmdir /mnt/temporary/"$data_name"\nOr use the Unmount All option" break elif [[ $selection == "2" ]]; then mapfile -t unmount_array < <(basename -a /mnt/temporary/* | sed "s/*//")