Skip to content

Instantly share code, notes, and snippets.

@cwage
Created May 8, 2017 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwage/b15d88e3fc72f9c16c255b167360e61f to your computer and use it in GitHub Desktop.
Save cwage/b15d88e3fc72f9c16c255b167360e61f to your computer and use it in GitHub Desktop.
root@portaptty:/etc/X11/Xsession.d# less 90gpg-agent
: ${GNUPGHOME=$HOME/.gnupg}
GPGAGENT=/usr/bin/gpg-agent
if grep -qs '^[[:space:]]*use-agent' "$GNUPGHOME/gpg.conf" "$GNUPGHOME/options" &&
test -x $GPGAGENT; then
# Invoking gpg-agent with no arguments exits successfully if the agent
# is already running on the standard socket
if ! $GPGAGENT 2>/dev/null; then
"$GPGAGENT" --daemon
fi
GPG_AGENT_INFO="${GNUPGHOME}/S.gpg-agent:0:1"
export GPG_AGENT_INFO
if grep -qs '^[[:space:]]*enable-ssh-support' "${GNUPGHOME}/gpg-agent.conf"; then
SSH_AUTH_SOCK="${GNUPGHOME}/S.gpg-agent.ssh"
export SSH_AUTH_SOCK
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment