initial commit
This commit is contained in:
22
bspwm/cryfsunlock.sh
Executable file
22
bspwm/cryfsunlock.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
CRYFS_DIR="/home/greg/.cryfs/"
|
||||
CRYFS_MOUNT_DIR="/home/greg/cryfs/"
|
||||
|
||||
# Retrieve volume name with zenity
|
||||
VOLUME=$(zenity --entry --title="Unlock Cryfs" --text="Volume:")
|
||||
|
||||
# Retrieve password with zenity
|
||||
PASSWORD=$(zenity --password --title="Unlock Cryfs" --text="Volume password:")
|
||||
|
||||
# Unlock the volume
|
||||
cryfs "$CRYFS_DIR$VOLUME" $CRYFS_MOUNT_DIR$VOLUME <<< $PASSWORD
|
||||
|
||||
# If the unlock was successful, show a success message
|
||||
if [ $? -eq 0 ]; then
|
||||
notify-send "Unlock Cryfs" "Volume $VOLUME unlocked successfully"
|
||||
exit 0
|
||||
else
|
||||
notify-send "Unlock Cryfs" "Failed to unlock volume $VOLUME"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user