garage_ynh/conf/umount_disk.sh
oiseauroch 81776945bb update
2022-11-30 11:59:12 +01:00

9 lines
179 B
Bash
Executable File

#!/bin/bash
if [ "$VIRTUALISATION" = "true" ]
then
datadir=__DATADIR__
nbd=$(cat $datadir/nbd_index)
umount /dev/nbd$nbd
qemu-nbd --disconnect /dev/nbd$nbd
fi