I'm using eCryptfs to mount and encrypt a particular directory via:
mount -t ecryptfs /secure /secure -o ecryptfs_unlink_sigs,ecryptfs_key_bytes=16,ecryptfs_cipher=aes
I've seen examples that use fstab to automatically mount using ecryptfs at boot time.
I'm wondering if it's possible / wise to do this as an upstart script, so that it can be executed as necessary and for testing purposes?
Ideally it would run before other Upstart scripts that depend on the directory being encrypted.
Please check the following script found at ruxkor's gist (original, superuser):
You may extend this script to use parameterized passphrase, e.g.:
or:
Modify the script as required.