move mount over to use heavyscript library
This commit is contained in:
parent
520caadacf
commit
3a1d22eebc
@ -63,7 +63,7 @@ do
|
|||||||
else
|
else
|
||||||
echo -e "\nMounted\n$data_name"
|
echo -e "\nMounted\n$data_name"
|
||||||
fi
|
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
|
#Ask if user would like to mount something else
|
||||||
while true
|
while true
|
||||||
@ -89,7 +89,7 @@ do
|
|||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
2)
|
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
|
[[ -z ${unmount_array[*]} ]] && echo "Theres nothing to unmount" && sleep 3 && continue
|
||||||
for i in "${unmount_array[@]}"
|
for i in "${unmount_array[@]}"
|
||||||
do
|
do
|
||||||
@ -98,9 +98,9 @@ do
|
|||||||
pvc=$(echo "$main" | awk '{print $3}')
|
pvc=$(echo "$main" | awk '{print $3}')
|
||||||
full_path=$(find /mnt/"$pool"/ix-applications/releases/"$app"/volumes/ -maxdepth 0 | cut -c 6-)
|
full_path=$(find /mnt/"$pool"/ix-applications/releases/"$app"/volumes/ -maxdepth 0 | cut -c 6-)
|
||||||
zfs set mountpoint=legacy "$full_path""$pvc"
|
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
|
done
|
||||||
rmdir /mnt/heavyscript
|
rmdir /mnt/truetool
|
||||||
sleep 3
|
sleep 3
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -38,6 +38,8 @@ source includes/update_self.sh
|
|||||||
source functions/dns.sh
|
source functions/dns.sh
|
||||||
# shellcheck source=functions/misc.sh
|
# shellcheck source=functions/misc.sh
|
||||||
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 no argument is passed, set flag to show menu
|
||||||
if [[ -z "$*" || "-" == "$*" || "--" == "$*" ]]; then
|
if [[ -z "$*" || "-" == "$*" || "--" == "$*" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user