From 6b813e40ad613be5273ef1e2a5e218220a2fbf55 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Sat, 19 Aug 2023 18:37:47 -0300 Subject: [PATCH] Fix ssh-agent on FreeBSD --- roles/home-cli/files/profile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index 0f89af0..d0e2a89 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -302,8 +302,8 @@ alias prust='prun --volume "$(pwd)":/devel --workdir /devel docker.io/library/ru # Set up SSH agent if it's not already running. if command -v ssh-agent > /dev/null then - export SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-$XDG_RUNTIME_DIR/ssh-agent.socket}" - export SSH_AGENT_PID="${SSH_AGENT_PID:-$XDG_RUNTIME_DIR/ssh-agent.pid}" + export SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-${XDG_RUNTIME_DIR:-$XDG_CONFIG_HOME}/ssh-agent.socket}" + export SSH_AGENT_PID="${SSH_AGENT_PID:-${XDG_RUNTIME_DIR:-$XDG_CONFIG_HOME}/ssh-agent.pid}" ssh-add -l > /dev/null 2>&1 _acp_ssh_agent_exists=$? if [ -S "$SSH_AUTH_SOCK" ] && [ $_acp_ssh_agent_exists -eq 2 ]