Skip to content

Commit 81c432a

Browse files
committed
nextcloud - add turn_domain logic
Signed-off-by: Simon L <[email protected]>
1 parent dd20ffc commit 81c432a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Containers/nextcloud/entrypoint.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,9 @@ if [ "$TALK_ENABLED" = 'yes' ]; then
628628
TALK_HOST="$NC_DOMAIN"
629629
HPB_PATH="/standalone-signaling/"
630630
fi
631+
if [ -z "$TURN_DOMAIN" ]; then
632+
TURN_DOMAIN="$TALK_HOST"
633+
fi
631634
set +x
632635
if ! [ -d "/var/www/html/custom_apps/spreed" ]; then
633636
php /var/www/html/occ app:install spreed
@@ -639,11 +642,11 @@ if [ "$TALK_ENABLED" = 'yes' ]; then
639642
# Based on https://github.com/nextcloud/spreed/issues/960#issuecomment-416993435
640643
if [ -z "$(php /var/www/html/occ talk:turn:list --output="plain")" ]; then
641644
# shellcheck disable=SC2153
642-
php /var/www/html/occ talk:turn:add turn "$TALK_HOST:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET"
645+
php /var/www/html/occ talk:turn:add turn "$TURN_DOMAIN:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET"
643646
fi
644647
STUN_SERVER="$(php /var/www/html/occ talk:stun:list --output="plain")"
645648
if [ -z "$STUN_SERVER" ] || echo "$STUN_SERVER" | grep -oP '[a-zA-Z.:0-9]+' | grep -q "^stun.nextcloud.com:443$"; then
646-
php /var/www/html/occ talk:stun:add "$TALK_HOST:$TALK_PORT"
649+
php /var/www/html/occ talk:stun:add "$TURN_DOMAIN:$TALK_PORT"
647650
php /var/www/html/occ talk:stun:delete "stun.nextcloud.com:443"
648651
fi
649652
if ! php /var/www/html/occ talk:signaling:list --output="plain" | grep -q "https://$TALK_HOST$HPB_PATH"; then

0 commit comments

Comments
 (0)