File: docker-entrypoint.sh

package info (click to toggle)
tmate-ssh-server 2.3.0-68-gd7334ee4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,552 kB
  • sloc: ansic: 39,257; awk: 339; makefile: 251; sh: 129; ruby: 45; perl: 41
file content (24 lines) | stat: -rwxr-xr-x 586 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e

if [ "${USE_PROXY_PROTOCOL:-0}" -eq "1" ]; then
  set -- -x "$@"
fi

if [ "${HAS_WEBSOCKET:-0}" -eq "1" ]; then
  set -- -w localhost "$@"
fi

if [ -n "${WEBSOCKET_HOSTNAME}" ]; then
  set -- -w "${WEBSOCKET_HOSTNAME}" "$@"
fi

if [ -n "${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}" "$@"