mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Allow s6 env support
This commit is contained in:
@@ -40,6 +40,7 @@ if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
||||
if bashio::config.has_value "COLLECTOR_API_ENDPOINT"; then
|
||||
echo "export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" >> /env.sh
|
||||
sed -i "1a export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" /etc/services.d/collector-once/run
|
||||
if [ -d /var/run/s6/container_environment ]; then printf "$COLLECTOR_API_ENDPOINT" > /var/run/s6/container_environment/COLLECTOR_API_ENDPOINT; fi
|
||||
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
||||
else
|
||||
bashio::exit.nok "Mode is set to 'Collector', but 'COLLECTOR_API_ENDPOINT' is not defined"
|
||||
|
||||
Reference in New Issue
Block a user