garage_ynh/conf/umount_disk.sh

9 lines
179 B
Bash
Raw Normal View History

#!/bin/bash
2022-10-06 09:46:45 +02:00
if [ "$VIRTUALISATION" = "true" ]
then
2022-11-30 11:59:12 +01:00
datadir=__DATADIR__
nbd=$(cat $datadir/nbd_index)
2022-10-06 09:46:45 +02:00
umount /dev/nbd$nbd
qemu-nbd --disconnect /dev/nbd$nbd
fi