Created
March 19, 2020 07:44
-
-
Save david-bergstrom/387f33788d18d15758d88423fc3afa8e to your computer and use it in GitHub Desktop.
Unlock gocryptfs filesystem using bitwarden-cli
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/bash | |
cipher=~/.gocryptfs | |
mountpoint=~/mountpoint | |
if mountpoint -q -- "$mountpoint"; then | |
printf "There is already something mounted at $mountpoint" | |
exit 1 | |
fi | |
session=$(bw unlock --raw) | |
bw --session $session get password cipher | gocryptfs $cipher $mountpoint | |
bw lock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment