summaryrefslogtreecommitdiffstats
path: root/bin/secrets
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-10-16 00:08:01 -0400
committerJesse Luehrs <doy@tozt.net>2018-10-16 00:08:01 -0400
commitacd6c2b8f2d96c259998f986f65ffe4f62927dad (patch)
treed8926b5bf21e2f36515a98561a067e4c070834b7 /bin/secrets
parent44cfd774e357033e6e359cc828116ffd96a298f3 (diff)
downloadpuppet-tozt-acd6c2b8f2d96c259998f986f65ffe4f62927dad.tar.gz
puppet-tozt-acd6c2b8f2d96c259998f986f65ffe4f62927dad.zip
automatically extract the password for the secrets
Diffstat (limited to 'bin/secrets')
-rwxr-xr-xbin/secrets3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/secrets b/bin/secrets
index 4e97314..7aef22c 100755
--- a/bin/secrets
+++ b/bin/secrets
@@ -12,7 +12,8 @@ mounted() {
cmd_open() {
if ! opened; then
- sudo cryptsetup open ~/crypt/tozt-secrets.luks tozt-secrets
+ pass="$(pass show crypt/tozt-secrets)"
+ echo -n "$pass" | sudo cryptsetup --key-file=- open ~/crypt/tozt-secrets.luks tozt-secrets
fi
if ! mounted; then
sudo mount /dev/mapper/tozt-secrets /mnt