Skip to content

Instantly share code, notes, and snippets.

@david-bergstrom
Created March 19, 2020 07:44
Show Gist options
  • Save david-bergstrom/387f33788d18d15758d88423fc3afa8e to your computer and use it in GitHub Desktop.
Save david-bergstrom/387f33788d18d15758d88423fc3afa8e to your computer and use it in GitHub Desktop.
Unlock gocryptfs filesystem using bitwarden-cli
#!/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