1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Allow hostname detection in docker

This commit is contained in:
Nicolas Viennot 2019-08-11 00:54:56 -04:00
parent bd65eb3c48
commit b2dc743aa6

View File

@ -2,7 +2,11 @@
set -e
if [ "${USE_PROXY}" == "1" ]; then
exec tmate-ssh-server -p 2200 -k ${SSH_KEYS_PATH} -h ${SSH_HOSTNAME} -x localhost
else
exec tmate-ssh-server -p 2200 -k ${SSH_KEYS_PATH} -h ${SSH_HOSTNAME}
set -- -x localhost "$@"
fi
if [ ! -z "${HOSTNAME}" ]; then
set -- -h "${HOSTNAME}" "$@"
fi
exec tmate-ssh-server -p 2200 -k ${SSH_KEYS_PATH} "$@"