Skip to content

Commit 01ab78a

Browse files
authored
Fix local TURN server
1 parent 9e05f1f commit 01ab78a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

selkies-gstreamer-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ export GSTREAMER_PATH=/opt/gstreamer
3232

3333
export SELKIES_ENCODER="${SELKIES_ENCODER:-x264enc}"
3434
export SELKIES_ENABLE_RESIZE="${SELKIES_ENABLE_RESIZE:-false}"
35-
if ( [ -z "${SELKIES_TURN_USERNAME}" ] || [ -z "${SELKIES_TURN_PASSWORD}" ] ) && [ -z "${SELKIES_TURN_SHARED_SECRET}" ] || [ -z "${SELKIES_TURN_HOST}" ] || [ -z "${SELKIES_TURN_PORT}" ]; then
35+
if [ -z "${SELKIES_TURN_REST_URI}" ] && { { [ -z "${SELKIES_TURN_USERNAME}" ] || [ -z "${SELKIES_TURN_PASSWORD}" ]; } && [ -z "${SELKIES_TURN_SHARED_SECRET}" ] || [ -z "${SELKIES_TURN_HOST}" ] || [ -z "${SELKIES_TURN_PORT}" ]; }; then
3636
export TURN_RANDOM_PASSWORD="$(tr -dc 'A-Za-z0-9' < /dev/urandom 2>/dev/null | head -c 24)"
3737
export SELKIES_TURN_HOST="${SELKIES_TURN_HOST:-$(curl -fsSL checkip.amazonaws.com 2>/dev/null || hostname -I 2>/dev/null | awk '{print $1}' || echo '127.0.0.1')}"
38-
export SELKIES_TURN_PORT="3478"
38+
export SELKIES_TURN_PORT="${SELKIES_TURN_PORT:-3478}"
3939
export SELKIES_TURN_USERNAME="selkies"
4040
export SELKIES_TURN_PASSWORD="${TURN_RANDOM_PASSWORD}"
4141
export SELKIES_TURN_PROTOCOL="${SELKIES_TURN_PROTOCOL:-tcp}"

0 commit comments

Comments
 (0)