start: remove SSH socket if present

This commit is contained in:
Fernando Schauenburg 2022-09-01 08:37:33 +02:00
parent d8b60916ef
commit 1c1fa63793

View file

@ -44,6 +44,7 @@ require npiperelay
# Forward SSH Agent requests from withitn WSL to OpenSSH for Windows, based on:
# https://stuartleeks.com/posts/wsl-ssh-key-forward-to-windows/
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
[ -S "$SSH_AUTH_SOCK" ] && rm "$SSH_AUTH_SOCK"
socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay -ei -s //./pipe/openssh-ssh-agent",nofork &
exec tmux new-session -A -t main "$@"