From 74c01068b4f69149b6a18104e6662cf5f1b8a4e6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 10 May 2023 00:27:50 +0200 Subject: [PATCH] gnupg/root --- bash/gnupg.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bash/gnupg.sh b/bash/gnupg.sh index 3d259ef..ab29be1 100644 --- a/bash/gnupg.sh +++ b/bash/gnupg.sh @@ -1,5 +1,7 @@ -export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" -gpg-connect-agent updatestartuptty /bye > /dev/null +if [ ${EUID} -ne 0 ] ; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + gpg-connect-agent updatestartuptty /bye > /dev/null +fi alias gpgoff='gpgconf --kill gpg-agent'