bash: Add shorthands to mount client-side encrypted NAS directories

This commit is contained in:
Peter Cai 2022-12-29 16:38:53 -05:00
parent 12683853e5
commit e7d024f68a
1 changed files with 8 additions and 0 deletions

View File

@ -157,3 +157,11 @@ function clamp_filename() {
fi fi
done done
} }
function open_nas_decrypt() {
gocryptfs -passfile /dev/stdin "$MACHINE_NAS_CIPHER_PATH" "$MACHINE_NAS_DECRYPT_PATH" <<< "$(pass gocrypt show "$MACHINE_NAS_CIPHER_PASS")"
}
function close_nas_decrypt() {
fusermount -u "$MACHINE_NAS_DECRYPT_PATH"
}