mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 12:54:04 +02:00
Use collector api
This commit is contained in:
@@ -17,6 +17,8 @@ if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
|||||||
# Check collector
|
# Check collector
|
||||||
if bashio::config.has_value "COLLECTOR_API_ENDPOINT"; then
|
if bashio::config.has_value "COLLECTOR_API_ENDPOINT"; then
|
||||||
echo "export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" >> /env.sh
|
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
|
||||||
|
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
||||||
else
|
else
|
||||||
bashio::exit.nok "Mode is set to 'Collector', but 'COLLECTOR_API_ENDPOINT' is not defined"
|
bashio::exit.nok "Mode is set to 'Collector', but 'COLLECTOR_API_ENDPOINT' is not defined"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user