mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-08 16:45:56 +02:00
Update 61-trusted_domains
This commit is contained in:
@@ -1,21 +1,22 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
|
|
||||||
|
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 || bashio::log.info "occ not found"
|
||||||
|
|
||||||
# Make sure there is an Nextcloud installation
|
# Make sure there is an Nextcloud installation
|
||||||
#if ! [ "$(nextcloud_occ -V)" ]; then
|
if ! [ "$($LAUNCHER -V)" ]; then
|
||||||
# bashio::log.warning "It seems there is no Nextcloud server installed. Please restart the addon after initialization of the user."
|
bashio::log.warning "It seems there is no Nextcloud server installed. Please restart the addon after initialization of the user."
|
||||||
# exit 0
|
exit 0
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Initialization #
|
# Initialization #
|
||||||
####################
|
####################
|
||||||
|
|
||||||
if bashio::config.has_value 'trusted_domains'; then
|
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 || 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 || bashio::log.info "No trusted domain set yet. The first one will be set when doing initial configuration"
|
$LAUNCHER config:system:get trusted_domains || bashio::log.info "No trusted domain set yet. The first one will be set when doing initial configuration"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user