From bd3ee6584c646050b40acbf3b596655abf23d26c Mon Sep 17 00:00:00 2001 From: kdeppe Date: Tue, 16 Aug 2022 07:42:01 -0400 Subject: [PATCH] fixed agent script --- bin/agent.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/agent.sh b/bin/agent.sh index 86ba177..9390af9 100755 --- a/bin/agent.sh +++ b/bin/agent.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # makes sure agent is active and adds keys -if [ -z $SSH_AGENT_SOCK ] ; then +if [ -z $SSH_AUTH_SOCK ] ; then # agent unset eval $(ssh-agent -s) if [ "$(ssh-add -l)" = "The agent has no identities." ] ; then @@ -14,5 +14,6 @@ if [ -z $SSH_AGENT_SOCK ] ; then echo "Killing $SSH_AGENT_PID!" eval $(ssh-agent -k) fi +else + echo "Agent already running at $SSH_AGENT_PID!" fi -