Skip to content

Commit

Permalink
Merge pull request #11 from docksal/develop
Browse files Browse the repository at this point in the history
Release 1.3.1
  • Loading branch information
lmakarov committed Oct 8, 2019
2 parents 3426af0 + 66084bb commit 1b86aca
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ set -e # Abort if anything fails
# Create the temporary key storage directory
mkdir -p ${SSH_DIR}

# Clean up previous socket files
rm -f ${SSH_AUTH_SOCK} ${SSH_AUTH_PROXY_SOCK}

# Service mode
if [[ "$1" == "ssh-agent" ]]; then
# Clean up previous socket files
rm -f ${SSH_AUTH_SOCK} ${SSH_AUTH_PROXY_SOCK}

# Create proxy-socket for ssh-agent (to give anyone accees to the ssh-agent socket)
echo "Creating proxy socket..."
socat UNIX-LISTEN:${SSH_AUTH_PROXY_SOCK},perm=0666,fork UNIX-CONNECT:${SSH_AUTH_SOCK} &
Expand All @@ -20,6 +20,9 @@ if [[ "$1" == "ssh-agent" ]]; then

# Proxy mode
elif [[ "$1" == "ssh-proxy" ]]; then
# Clean up previous socket files
rm -f ${SSH_AUTH_SOCK} ${SSH_AUTH_PROXY_SOCK}

# Create proxy-socket for TCP target
tcp_target_ip="$2"
tcp_target_port="$3"
Expand Down

0 comments on commit 1b86aca

Please sign in to comment.