From 813556f0b11c7cdbe7183aa3969d6da5a08cd54c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 21 Feb 2021 21:48:11 +0100 Subject: [PATCH] Update 61-trusted_domains --- nextcloud/root/etc/cont-init.d/61-trusted_domains | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nextcloud/root/etc/cont-init.d/61-trusted_domains b/nextcloud/root/etc/cont-init.d/61-trusted_domains index a4f5d1b64..3c2cf6048 100644 --- a/nextcloud/root/etc/cont-init.d/61-trusted_domains +++ b/nextcloud/root/etc/cont-init.d/61-trusted_domains @@ -4,15 +4,15 @@ # Initialization # #################### -LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" +if bashio::config.has_value 'trusted_domains'; then +LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" || bashio::log.info "/data/config/www/nextcloud/occ not found" if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then LAUNCHER=`find / -name "occ" -print -quit` -fi +fi || bashio::log.info "occ not found" bashio::log.info "Currently set trusted domains :" -$LAUNCHER config:system:get trusted_domains || exit +$LAUNCHER config:system:get trusted_domains || bashio::log.info "No trusted domain set yet. The first one will be set when doing initial configuration" -if bashio::config.has_value 'trusted_domains'; then bashio::log.info "Trusted domains set in the configuration. Refreshing domains." && \ ################################### # Remove previous trusted domains # @@ -37,7 +37,9 @@ if bashio::config.has_value 'trusted_domains'; then $LAUNCHER config:system:set trusted_domains $i --value=${domain} && \ ((i=i+1)) done -fi bashio::log.info "Remaining configurated trusted domains :" -bashio::log.info `$LAUNCHER config:system:get trusted_domains` +bashio::log.info "$LAUNCHER config:system:get trusted_domains" + +fi +