Automatically-mounting-veracrypt-volume-at-boot
Jump to navigation
Jump to search
This script automatically opens a truecrypt volume using veracrypt. Requires the 'veracrypt' binary to be installed.
#!/bin/bash # mount a truecrypt volume VC=/usr/bin/veracrypt CONTAINER=/mnt/usb/truecrypt-volume.tc MOUNTPOINT=/mnt/data VC_PASS=<yourpassword> DMASK=0022 FMASK=0133 # veracrypt syntax: if echo "$VC_PASS" | $VC -tc -t -k "" --protect-hidden=no "$CONTAINER" "$MOUNTPOINT" --fs-options="users,gid=100000,dmask=$DMASK,fmask=$FMASK" then echo "$CONTAINER mounted" else echo "Unable to find veracrypt/truecrypt container $CONTAINER" fi