2019-03-09 13:15:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-03-10 07:51:03 +00:00
|
|
|
rc=$(pgrep gpg-agent)
|
|
|
|
if [ "$rc" != 0 ]; then
|
2019-03-09 13:15:07 +00:00
|
|
|
export GPG_AGENT_INFO
|
|
|
|
export SSH_AUTH_SOCK
|
|
|
|
export SSH_AGENT_PID
|
|
|
|
else
|
2019-03-10 07:51:03 +00:00
|
|
|
eval $(gpg-agent --daemon)
|
2019-03-09 13:15:07 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
gpg-connect-agent /bye
|
|
|
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
|
|
|