mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
gpg-agent from systemd support.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
use-standard-socket
|
|
||||||
default-cache-ttl 7200
|
default-cache-ttl 7200
|
||||||
default-cache-ttl-ssh 7200
|
default-cache-ttl-ssh 7200
|
||||||
max-cache-ttl 86400
|
max-cache-ttl 86400
|
||||||
max-cache-ttl-ssh 86400
|
max-cache-ttl-ssh 86400
|
||||||
|
enable-ssh-support
|
||||||
|
|||||||
@@ -18,8 +18,13 @@ function start_agent_withssh {
|
|||||||
|
|
||||||
# check if another agent is running
|
# check if another agent is running
|
||||||
if ! gpg-connect-agent --agent-program /dev/null --quiet /bye > /dev/null 2> /dev/null; then
|
if ! gpg-connect-agent --agent-program /dev/null --quiet /bye > /dev/null 2> /dev/null; then
|
||||||
|
if [ -d "${XDG_RUNTIME_DIR}/gnupg" ] ; then
|
||||||
|
GPG_AGENT_INFO=${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent
|
||||||
|
SSH_AUTH_SOCK=${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh
|
||||||
|
export GPG_AGENT_INFO
|
||||||
|
export SSH_AUTH_SOCK
|
||||||
# source settings of old agent, if applicable
|
# source settings of old agent, if applicable
|
||||||
if [ -f "${GPG_ENV}" ]; then
|
elif [ -f "${GPG_ENV}" ]; then
|
||||||
# This can be clobbered by the file
|
# This can be clobbered by the file
|
||||||
local OLD_SSH_AUTH_SOCK=${SSH_AUTH_SOCK}
|
local OLD_SSH_AUTH_SOCK=${SSH_AUTH_SOCK}
|
||||||
. ${GPG_ENV} > /dev/null
|
. ${GPG_ENV} > /dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user