1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-05 00:27:25 +00:00
mailinabox/ehdd/umount.sh
downtownallday 38d0bcff22 Add support for non-interactive install
Centralize all scripts into 'ehdd'
2020-06-22 10:03:21 -04:00

12 lines
236 B
Bash
Executable File

#!/bin/bash
. "ehdd/ehdd_funcs.sh" || exit 1
if ! mount | grep "$EHDD_MOUNTPOINT" >/dev/null; then
# not mounted
exit 0
fi
umount "$EHDD_MOUNTPOINT" || exit 1
cryptsetup luksClose $EHDD_LUKS_NAME
losetup -d $(find_inuse_loop)