dots/30-ssh-agent/profile

11 lines
332 B
Plaintext
Raw Normal View History

2019-02-22 13:13:19 +11:00
if [ -f ~/.agent.env ] ; then
. ~/.agent.env > /dev/null
if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then
#echo "Stale agent file found. Spawning new agent… "
eval `ssh-agent | tee ~/.agent.env` >/dev/null
fi
else
#echo "Starting ssh-agent"
eval `ssh-agent | tee ~/.agent.env` >/dev/null
fi