sh/bash/gnupg.sh
2023-05-10 00:27:50 +02:00

8 lines
251 B
Bash

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'
alias gpgtty='gpg-connect-agent updatestartuptty /bye'