talk - stun servers may be empty

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-03-21 19:17:41 +01:00
parent af78a8ff4c
commit 4256dc8021

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