linux-image-manager/scripts/unlock.sh

16 lines
498 B
Bash
Raw Normal View History

#!/bin/bash
2019-10-01 11:59:31 +02:00
#
# Unlocks the data
# @author Kevin Veen-Birkenbach [aka. Frantz]
2019-10-01 11:59:31 +02:00
#
2019-10-01 12:30:27 +02:00
# shellcheck source=/dev/null # Deactivate SC1090
2019-10-01 08:50:17 +02:00
source "$(dirname "$(readlink -f "${0}")")/base.sh"
2019-10-01 12:30:27 +02:00
echo "Unlocking directory $DECRYPTED_PATH..."
if [ ! -d "$DECRYPTED_PATH" ]
then
echo "Creating directory $DECRYPTED_PATH..."
mkdir "$DECRYPTED_PATH"
fi
2019-10-01 12:30:27 +02:00
echo "Encrypting directory $DECRYPTED_PATH to $DECRYPTED_PATH..."
encfs "$ENCRYPTED_PATH" "$DECRYPTED_PATH" && echo "ATTENTION: DATA IS NOW DECRYPTED!"