mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-25 00:36:06 +02:00
Update 61-trusted_domains
This commit is contained in:
@@ -4,15 +4,15 @@
|
|||||||
# Initialization #
|
# 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
|
if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then
|
||||||
LAUNCHER=`find / -name "occ" -print -quit`
|
LAUNCHER=`find / -name "occ" -print -quit`
|
||||||
fi
|
fi || bashio::log.info "occ not found"
|
||||||
|
|
||||||
bashio::log.info "Currently set trusted domains :"
|
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." && \
|
bashio::log.info "Trusted domains set in the configuration. Refreshing domains." && \
|
||||||
###################################
|
###################################
|
||||||
# Remove previous trusted 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} && \
|
$LAUNCHER config:system:set trusted_domains $i --value=${domain} && \
|
||||||
((i=i+1))
|
((i=i+1))
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
bashio::log.info "Remaining configurated trusted domains :"
|
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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user