Use the latest version of the agent file, externalize common strings into var in defaults

This commit is contained in:
2019-05-02 19:51:20 +02:00
parent 46f25cf616
commit 383abb4458
4 changed files with 26 additions and 19 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
rc=$(pgrep gpg-agent)
if [ "$rc" != 0 ]; then
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
else
eval $(gpg-agent --daemon)
fi
gpg-connect-agent /bye
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)