Browse Source

fix: [nextcloud] detect correctly previously declared trusted domain

This will prevent also to have a new trusted domain being added at each
relation-joined time.

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
0k/dev/master
Valentin Lab 5 years ago
parent
commit
9b0c1e3f3a
  1. 2
      nextcloud/hooks/web_proxy-relation-joined

2
nextcloud/hooks/web_proxy-relation-joined

@ -18,7 +18,7 @@ occ_opts=(
config:system:set overwritehost --value="$DOMAIN" \;
config:system:set overwriteprotocol --value="$PROTO"
)
if ! [[ "$'\n'$trusted_domains$'\n'" == *"$'\n'$MASTER_BASE_SERVICE_NAME$'\n'"* ]]; then
if ! [[ $'\n'"$trusted_domains"$'\n' == *$'\n'"$MASTER_BASE_SERVICE_NAME"$'\n'* ]]; then
trusted_index=$(echo "$trusted_domains" | wc -l)
debug "Adding $MASTER_TARGET_SERVICE_NAME to ${WHITE}trusted_domains${NORMAL}."
occ_opts+=( \; config:system:set trusted_domains "$trusted_index" --value="$MASTER_BASE_SERVICE_NAME")

Loading…
Cancel
Save