github.com_burnett01_rsync-.../agent-start

11 lines
265 B
Text
Raw Normal View History

2020-01-02 16:57:06 +01:00
#!/bin/sh
# Start the SSH agent if it isn't already.
if [ -z "$SSH_AGENT_PID" ]; then
2020-01-02 18:06:16 +01:00
eval "$(ssh-agent)" > /dev/null
2020-01-02 16:57:06 +01:00
echo "$SSH_AGENT_PID" > /tmp/ssh-agent-id
2020-01-02 17:28:48 +01:00
echo "Started SSH Agent. PID: $SSH_AGENT_PID"
else
echo "SSH Agent Running. PID: $SSH_AGENT_PID"
2020-01-02 16:57:06 +01:00
fi