diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-10-16 00:08:01 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-10-16 00:08:01 -0400 |
commit | acd6c2b8f2d96c259998f986f65ffe4f62927dad (patch) | |
tree | d8926b5bf21e2f36515a98561a067e4c070834b7 /bin | |
parent | 44cfd774e357033e6e359cc828116ffd96a298f3 (diff) | |
download | puppet-tozt-acd6c2b8f2d96c259998f986f65ffe4f62927dad.tar.gz puppet-tozt-acd6c2b8f2d96c259998f986f65ffe4f62927dad.zip |
automatically extract the password for the secrets
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/secrets | 3 |
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 |