1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00
tmate-ssh-server/docker-entrypoint.sh
2019-10-13 05:01:11 -04:00

21 lines
489 B
Bash
Executable File

#!/bin/sh
set -e
if [ "${USE_PROXY_PROTOCOL}" == "1" ]; then
set -- -x "$@"
fi
if [ "${HAS_WEBSOCKET}" == "1" ]; then
set -- -w localhost "$@"
fi
if [ ! -z "${SSH_HOSTNAME}" ]; then
set -- -h "${SSH_HOSTNAME}" "$@"
fi
SSH_PORT_LISTEN=${SSH_PORT_LISTEN:-2200}
SSH_PORT_ADVERTIZE=${SSH_PORT_ADVERTIZE:-${SSH_PORT_LISTEN}}
SSH_PORT_ADVERTISE=${SSH_PORT_ADVERTISE:-${SSH_PORT_ADVERTIZE}}
exec tmate-ssh-server -p ${SSH_PORT_LISTEN} -q ${SSH_PORT_ADVERTISE} -k ${SSH_KEYS_PATH} "$@"