Commit 96e3c383 authored by Robert Labudda's avatar Robert Labudda
Browse files

getpassword.sh: include access to keepassxc 'service' group

parent e4b18fa5
......@@ -48,9 +48,9 @@ Requirements: gopass, dmenu, xdotool
getpassword.sh
--------------
A shell script to obtain (encrypted) passwords from `~/.passwords/` for use in
other shell scripts that require passwords (like `msmtp`, `vdirsyncer`,
`mbsync`/`isync`, `fetchmail`, etc.etc)
A shell script to obtain (encrypted) passwords from `~/.passwords/` or
`keepassxc` for use in other shell scripts that require passwords (like
`msmtp`, `vdirsyncer`, `mbsync`/`isync`, `fetchmail`, etc.etc)
To put a password in place you could read it in and encrypt it like this:
......@@ -70,6 +70,8 @@ ask you for it.
Requirements: bash, gpg, pinentry
Optional: keepassxc, secret-tool
findpgpkey.py
-------------
......
#!/bin/bash
# ~/bin/getpassword.sh
# ~/.local/bin/getpassword.sh
NAME=$1
if [ -n "$(pgrep keepassxc)" ]
then
secret-tool lookup service "$NAME"
if [ $? = 0 ]
then
exit 0
fi
fi
if [ -e "$HOME/.passwords/$NAME.asc" ]
then
gpg -o - --for-your-eyes-only -d $HOME/.passwords/$NAME.asc 2> /dev/null
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment