Skip to content

Commit

Permalink
Merge branch 'wsl2-ssh-agent-proxy' of github.com:masahide/OmniSSHAge…
Browse files Browse the repository at this point in the history
…nt into wsl2-ssh-agent-proxy
  • Loading branch information
masahide committed Sep 2, 2024
2 parents 11f2823 + 2aa98f6 commit 0d987f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hack/ubuntu.setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ __get_socat() {

setup_omnisocat() {
[ -f "$OMNISOCATCMD" ] || __get_omnisocat
command -v socat >/dev/null 2>&1 || __get_socat
command -v socat > /dev/null 2>&1 || __get_socat

# Checks wether $SSH_AUTH_SOCK is a socket or not
(ss -a | grep -q "$SSH_AUTH_SOCK") && [ -S "$SSH_AUTH_SOCK" ] && return
Expand All @@ -34,7 +34,7 @@ setup_omnisocat() {
fi

rm -f "$SSH_AUTH_SOCK"
(setsid socat UNIX-LISTEN:"$SSH_AUTH_SOCK",fork EXEC:"$OMNISOCATCMD",nofork &) >/dev/null 2>&1
(setsid socat UNIX-LISTEN:"$SSH_AUTH_SOCK",fork EXEC:"$OMNISOCATCMD",nofork &) > /dev/null 2>&1
}

setup_omnisocat
4 changes: 2 additions & 2 deletions hack/ubuntu.wsl2-ssh-agent-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi
__get_proxy() {
echo "Downloading ${NAME}.gz"
mkdir -p "${PROXYCMD_DIR}"
curl "${REPO_URL}/releases/${VER_PATH}/${NAME}.gz" -sL | gunzip >"${CMD}"
curl "${REPO_URL}/releases/${VER_PATH}/${NAME}.gz" -sL | gunzip > "${CMD}"
chmod +x "${CMD}"
}

Expand All @@ -34,7 +34,7 @@ setup_proxy() {
chmod 700 "${SSH_AUTH_SOCK_DIR}"
fi

nohup "${CMD}" >>"${PROXYCMD_DIR}/${NAME}.log" 2>&1 &
nohup "${CMD}" >> "${PROXYCMD_DIR}/${NAME}.log" 2>&1 &
}

setup_proxy

0 comments on commit 0d987f7

Please sign in to comment.