Merge pull request #2177 from nextcloud/enh/noid/talk-stun

talk - stun servers may be empty
This commit is contained in:
Simon L 2023-03-23 13:41:39 +01:00 committed by GitHub
commit d20489de7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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