Created
June 19, 2016 01:28
-
-
Save jadams/948cb5b8b1230595fcc379f08a4e56cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$UID" -ne "0" ] | |
then | |
echo Must be run as root. | |
exit 1 | |
fi | |
if [ ! -f "$1" ] | |
then | |
echo Source not found. | |
exit 1 | |
fi | |
if [ ! -d "$2" ] | |
then | |
echo Mountpoint does not exist. | |
exit 1 | |
fi | |
VERANAME=vera$(date +%Y%m%d%H%M%S) | |
cryptsetup open --type tcrypt --veracrypt "$1" "$VERANAME" | |
mount -o,uid=1000,gid=1000,umask=0022,x-gvfs-show /dev/mapper/"$VERANAME" "$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment