diff --git a/bash/gpg.sh b/bash/gpg.sh index 8025b64..abea396 100644 --- a/bash/gpg.sh +++ b/bash/gpg.sh @@ -1,4 +1,6 @@ if [ ${EUID} -ne 0 ] ; then - export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" - gpg-connect-agent updatestartuptty /bye > '/dev/null' + if [ -f "${HOME}/.gnupg/gpg-agent.conf" ] ; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + gpg-connect-agent updatestartuptty /bye > '/dev/null' + fi fi