only check our processes for ssh-agent

This commit is contained in:
Em 2020-11-09 15:08:10 +00:00
parent 40ac92ec17
commit 61df900e57
1 changed files with 1 additions and 1 deletions

2
.zshrc
View File

@ -67,7 +67,7 @@ alias senv="source .env/bin/activate"
if [ -z "$SSH_AUTH_SOCK" ]
then
# Check for a currently running instance of the agent
RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`"
RUNNING_AGENT="`ps -x | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`"
if [ "$RUNNING_AGENT" = "0" ]
then
# Launch a new instance of the agent