From f8a1c1862a072b0e0887081e69cf4f6eabc765cc Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 25 Oct 2022 21:03:10 +0200 Subject: [PATCH] address review Signed-off-by: szaimen --- Containers/nextcloud/Dockerfile | 1 + Containers/nextcloud/entrypoint.sh | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index f2398570..2ef874b5 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -203,6 +203,7 @@ RUN set -ex; \ tzdata \ mawk \ sudo \ + grep \ ; \ rm -rf /var/lib/apt/lists/* diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 7e2cbea1..fa736390 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -399,14 +399,15 @@ if [ "$TALK_ENABLED" = 'yes' ]; then php /var/www/html/occ app:update spreed fi # Based on https://github.com/nextcloud/spreed/issues/960#issuecomment-416993435 - if ! php /var/www/html/occ talk:turn:list --output="plain" | grep -q "$NC_DOMAIN:$TALK_PORT"; then + if [ -z "$(php /var/www/html/occ talk:turn:list --output="plain")" ]; then php /var/www/html/occ talk:turn:add "$NC_DOMAIN:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET" fi - if ! php /var/www/html/occ talk:stun:list --output="plain" | grep -q "$NC_DOMAIN:$TALK_PORT"; then + 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 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 if ! php /var/www/html/occ talk:signaling:list --output="plain" | grep -q "https://$NC_DOMAIN/standalone-signaling/"; then - php /var/www/html/occ talk:signaling:add "https://$NC_DOMAIN/standalone-signaling/" "$SIGNALING_SECRET" --validate-ssh-certificate + php /var/www/html/occ talk:signaling:add "https://$NC_DOMAIN/standalone-signaling/" "$SIGNALING_SECRET" --verify fi else if [ -d "/var/www/html/custom_apps/spreed" ]; then