1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garage_ynh.git synced 2024-09-03 18:36:32 +02:00
garage_ynh/conf/umount_disk.sh
2023-12-10 14:41:03 +01:00

10 lines
212 B
Bash
Executable file

#!/bin/bash
# If we're NOT inside a container
if ! systemd-detect-virt -c -q
then
data_dir=__DATA_DIR__
nbd=$(cat $data_dir/nbd_index)
umount /dev/nbd$nbd
qemu-nbd --disconnect /dev/nbd$nbd
fi