2022-08-18 20:20:24 +00:00
|
|
|
#!/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)
|
2022-08-20 19:54:29 +00:00
|
|
|
gpgconf --launch gpg-agent
|