Browse Source

chg: [nextcloud] enhance error reporting upong relation failing

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
pull/29/head
Valentin Lab 2 years ago
parent
commit
5e43229ec0
  1. 11
      nextcloud/hooks/web_proxy-relation-joined

11
nextcloud/hooks/web_proxy-relation-joined

@ -6,9 +6,16 @@ DOMAIN=$(relation-get domain) || exit 1
URL="$(relation-get url)" || exit 1
PROTO="${URL%%://*}"
trusted_domains="$(
if ! trusted_domains="$(
compose -q --no-relations --no-init occ "$MASTER_BASE_SERVICE_NAME" \
config:system:get trusted_domains)"
config:system:get trusted_domains)"; then
err "Couldn't get 'trusted_domains'. Here's the ouput:"
echo "$trusted_domains" | prefix " | " >&2
echo "If the code of nextcloud is already there (command occ is found), but " >&2
echo "the database is not yet created, this situation will arise." >&2
exit 1
fi
occ_opts=(
## necessary as nextcloud do not detect correctly those, and behind

Loading…
Cancel
Save