mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-26 00:41:04 +01:00
Optimized lock mechanism
This commit is contained in:
parent
dc72bd5d31
commit
06c78211a1
@ -2,5 +2,5 @@
|
|||||||
# Locks the data
|
# Locks the data
|
||||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||||
DECRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
|
DECRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
|
||||||
echo "Locking directory: $DECRYPTED"
|
echo "Locking directory $DECRYPTED..."
|
||||||
fusermount -u $DECRYPTED && echo "Data is now encrypted."
|
fusermount -u $DECRYPTED && echo "Data is now encrypted." && echo "Removing directory $DECRYPTED..." && rmdir $DECRYPTED
|
||||||
|
@ -3,5 +3,8 @@
|
|||||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||||
ENCRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../.encrypted");
|
ENCRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../.encrypted");
|
||||||
DECRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
|
DECRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
|
||||||
echo "Unlocking directory: $DECRYPTED"
|
echo "Unlocking directory $DECRYPTED..."
|
||||||
|
echo "Creating directory $DECRYPTED..."
|
||||||
|
mkdir $DECRYPTED
|
||||||
|
echo "Encrypting directory $DECRYPTED to $DECRYPTED..."
|
||||||
encfs $ENCRYPTED $DECRYPTED && echo "ATTENTION: DATA IS NOW DECRYPTED!"
|
encfs $ENCRYPTED $DECRYPTED && echo "ATTENTION: DATA IS NOW DECRYPTED!"
|
||||||
|
Loading…
Reference in New Issue
Block a user