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
2022-06-27 11:02:15 -04:00

13 lines
205 B
Bash
Executable File

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