This commit is contained in:
Marc Beninca 2024-11-12 06:26:59 +01:00
parent 68d5c0b51a
commit 763d199cde
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,5 +1,12 @@
if [ ${EUID} -ne 0 ] ; then gpg_ssh() {
if [ -f "${HOME}/.gnupg/gpg-agent.conf" ] ; then local user_id
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" user_id=$(id --user)
fi if [ "${user_id}" -ne 0 ]; then
fi if [ -f "${HOME}/.gnupg/gpg-agent.conf" ]; then
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK
fi
fi
}
gpg_ssh