Fixed GPG-Agent having wrong options and erroring out if agent is not running instead of starting it

This commit is contained in:
Johanna Dorothea Reichmann 2019-03-10 08:51:03 +01:00
parent ef2487a9e0
commit 8d40aa6e63
Signed by: transcaffeine
GPG Key ID: 03624C433676E465
2 changed files with 4 additions and 5 deletions

View File

@ -1,11 +1,12 @@
#!/bin/bash
if [ $(pgrep gpg-agent) != 0 ]; then
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 ~/.gpg-agent-info)
eval $(gpg-agent --daemon)
fi
gpg-connect-agent /bye

View File

@ -2,8 +2,6 @@ default-cache-ttl 300
default-cache-ttl-ssh 300
max-cache-ttl 300
max-cache-ttl-ssh 300
ingore-cache-for-signing
no-allow-external-cache
enable-ssh-support
ignore-cache-for-signing