mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
Merge pull request #4495 from nextcloud/enh/noid/adjust-talk-logic
nextcloud - adjust TALK_HOST logic
This commit is contained in:
commit
4ad2b20fc8
1 changed files with 11 additions and 4 deletions
|
|
@ -623,6 +623,12 @@ fi
|
||||||
|
|
||||||
# Talk
|
# Talk
|
||||||
if [ "$TALK_ENABLED" = 'yes' ]; then
|
if [ "$TALK_ENABLED" = 'yes' ]; then
|
||||||
|
set -x
|
||||||
|
if [ -z "$TALK_HOST" ] || echo "$TALK_HOST" | grep -q "nextcloud-.*-talk"; then
|
||||||
|
TALK_HOST="$NC_DOMAIN"
|
||||||
|
HPB_PATH="/standalone-signaling/"
|
||||||
|
fi
|
||||||
|
set +x
|
||||||
if ! [ -d "/var/www/html/custom_apps/spreed" ]; then
|
if ! [ -d "/var/www/html/custom_apps/spreed" ]; then
|
||||||
php /var/www/html/occ app:install spreed
|
php /var/www/html/occ app:install spreed
|
||||||
elif [ "$(php /var/www/html/occ config:app:get spreed enabled)" != "yes" ]; then
|
elif [ "$(php /var/www/html/occ config:app:get spreed enabled)" != "yes" ]; then
|
||||||
|
|
@ -632,15 +638,16 @@ if [ "$TALK_ENABLED" = 'yes' ]; then
|
||||||
fi
|
fi
|
||||||
# Based on https://github.com/nextcloud/spreed/issues/960#issuecomment-416993435
|
# Based on https://github.com/nextcloud/spreed/issues/960#issuecomment-416993435
|
||||||
if [ -z "$(php /var/www/html/occ talk:turn:list --output="plain")" ]; 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"
|
# shellcheck disable=SC2153
|
||||||
|
php /var/www/html/occ talk:turn:add turn "$TALK_HOST:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET"
|
||||||
fi
|
fi
|
||||||
STUN_SERVER="$(php /var/www/html/occ talk:stun:list --output="plain")"
|
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
|
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:add "$TALK_HOST:$TALK_PORT"
|
||||||
php /var/www/html/occ talk:stun:delete "stun.nextcloud.com:443"
|
php /var/www/html/occ talk:stun:delete "stun.nextcloud.com:443"
|
||||||
fi
|
fi
|
||||||
if ! php /var/www/html/occ talk:signaling:list --output="plain" | grep -q "https://$NC_DOMAIN/standalone-signaling/"; then
|
if ! php /var/www/html/occ talk:signaling:list --output="plain" | grep -q "https://$TALK_HOST$HPB_PATH"; then
|
||||||
php /var/www/html/occ talk:signaling:add "https://$NC_DOMAIN/standalone-signaling/" "$SIGNALING_SECRET" --verify
|
php /var/www/html/occ talk:signaling:add "https://$TALK_HOST$HPB_PATH" "$SIGNALING_SECRET" --verify
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/spreed" ]; then
|
if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/spreed" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue