Zprofile ssh-agent fix for when no agent is running but .env file exists.
This commit is contained in:
parent
71f025f4a0
commit
d610225c84
1 changed files with 1 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
# SSH Agent
|
||||
if [[ ! -f "$XDG_RUNTIME_DIR/ssh-agent.env" ]]; then
|
||||
if ! pgrep -u "$USER" ssh-agent > /dev/null || [[ ! -f "$XDG_RUNTIME_DIR/ssh-agent.env" ]]; then
|
||||
pkill -u "$USER" -9 ssh-agent
|
||||
ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue