|
|
|
@ -20,7 +20,7 @@ source "$_gpg_agent_env" 2> /dev/null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Start gpg-agent if not started.
|
|
|
|
|
if [[ -z "$GPG_AGENT_INFO" && ! -S ${_gpg_agent_socket}" ]]; then
|
|
|
|
|
if [[ -z "$GPG_AGENT_INFO" && ! -S "${_gpg_agent_socket}" ]]; then
|
|
|
|
|
# Start gpg-agent if not started.
|
|
|
|
|
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "^[0-9]* gpg-agent$"; then
|
|
|
|
|
eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
|
|
|
|
@ -49,7 +49,7 @@ if grep '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Clean up.
|
|
|
|
|
unset _gpg_agent_{conf,env}
|
|
|
|
|
unset _gpg_agent_{conf,env,socket}
|
|
|
|
|
|
|
|
|
|
# Disable GUI prompts inside SSH.
|
|
|
|
|
if [[ -n "$SSH_CONNECTION" ]]; then
|
|
|
|
|