#!/bin/bash

## Copyright (C) 2023 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

set -x
set -o errexit
set -o nounset
set -o pipefail
set -o errtrace
shopt -s inherit_errexit

sudo umount /mnt/disk

sudo cryptsetup luksClose disk

true "INFO: rmdir does not delete the folders in case not empty."
rmdir -- /mnt/disk
