From 4256dc80215375840acdea0b5ae68329fa8f3a63 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 21 Mar 2023 19:17:41 +0100 Subject: [PATCH] talk - stun servers may be empty Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 36a0c59e..7e3fd9b0 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -529,7 +529,8 @@ if [ "$TALK_ENABLED" = 'yes' ]; then if [ -z "$(php /var/www/html/occ talk:turn:list --output="plain")" ]; then php /var/www/html/occ talk:turn:add turn "$NC_DOMAIN:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET" fi - if php /var/www/html/occ talk:stun:list --output="plain" | grep -oP '[a-zA-Z.:0-9]+' | grep -q "^stun.nextcloud.com:443$"; then + STUN_SERVER="$(php /var/www/html/occ talk:stun:list --output="plain")" + if [ -z "$STUN_SERVER" ] || echo "$STUN_SERVER" | grep -oP '[a-zA-Z.:0-9]+' | grep -q "^stun.nextcloud.com:443$"; then php /var/www/html/occ talk:stun:add "$NC_DOMAIN:$TALK_PORT" php /var/www/html/occ talk:stun:delete "stun.nextcloud.com:443" fi