From 804a2361ddc674aa1f571fa6f9a36b90716f546c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 22 Jan 2021 11:37:17 +0100 Subject: [PATCH] Update 52-trusted_domains --- .../root/etc/cont-init.d/52-trusted_domains | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/nextcloud/root/etc/cont-init.d/52-trusted_domains b/nextcloud/root/etc/cont-init.d/52-trusted_domains index 69f0c193a..b30e4df82 100644 --- a/nextcloud/root/etc/cont-init.d/52-trusted_domains +++ b/nextcloud/root/etc/cont-init.d/52-trusted_domains @@ -1,15 +1,15 @@ #!/usr/bin/with-contenv bashio if bashio::config.has_value 'trusted_domains'; then - bashio::log.info "Trusted domains set in the configuration. Refreshing domains." + bashio::log.info "Trusted domains set in the configuration. Refreshing domains." && \ ################################### # Remove previous trusted domains # ################################### - bashio::log.info "... removing previously added trusted domain (except for first one created - this one should be removed manually)" + bashio::log.info "... removing previously added trusted domain (except for first one created - this > i=2 until [ $i -gt 5 ] do - /usr/bin/occ config:system:delete trusted_domains $i + /usr/bin/occ config:system:delete trusted_domains $i && \ ((i=i+1)) done @@ -18,14 +18,15 @@ if bashio::config.has_value 'trusted_domains'; then ########################### TRUSTEDDOMAINS=$(bashio::config 'trusted_domains') bashio::log.info "... alignement with trusted domains list : ${TRUSTEDDOMAINS}" && \ - for domain in $TRUSTEDDOMAINS i=2 + for domain in $TRUSTEDDOMAINS do - bashio::log.info "... adding ${domain}" - /usr/bin/occ config:system:set trusted_domains $i --value=${domain} + bashio::log.info "... adding ${domain}" && \ + /usr/bin/occ config:system:set trusted_domains $i --value=${domain} && \ ((i=i+1)) done || \ + fi - bashio::log.info "Remaining configurated trusted domains :" - bashio::log.info echo /usr/bin/occ config:system:get trusted_domains +bashio::log.info "Remaining configurated trusted domains :" +bashio::log.info `/usr/bin/occ config:system:get trusted_domains`