Commit 142ad842 authored by Marc Cornellà's avatar Marc Cornellà
Browse files

Simplify PID check of current ssh-agent

parent cb0833ac
......@@ -30,7 +30,7 @@ if [[ $_agent_forwarding == "yes" && -n "$SSH_AUTH_SOCK" ]]; then
elif [[ -f "$_ssh_env_cache" ]]; then
# Source SSH settings, if applicable
. $_ssh_env_cache > /dev/null
ps x | grep $SSH_AGENT_PID | grep ssh-agent > /dev/null || {
ps -o cmd -p $SSH_AGENT_PID | grep -q ssh-agent || {
_start_agent
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment