7 lines
215 B
Bash
7 lines
215 B
Bash
# ssh-agent
|
|
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
|
ssh-agent -t 2h > "$XDG_RUNTIME_DIR/ssh-agent.env"
|
|
fi
|
|
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
|
|
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
|
|
fi
|