Allow s6 env support

This commit is contained in:
Alexandre
2023-02-12 11:55:38 +01:00
parent 0d697bcd4a
commit 86ba596ef5
12 changed files with 21 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ if bashio::config.true 'mqtt_autodiscover'; then
export MQTT_SSL=$(bashio::services mqtt "ssl") || bashio::log.error "can't fetch bashio::services mqtt 'ssl'"
export MQTT_USERNAME=$(bashio::services mqtt "username") || bashio::log.error "can't fetch bashio::services mqtt 'username'"
export MQTT_PASSWORD=$(bashio::services mqtt "password") || bashio::log.error "can't fetch bashio::services mqtt 'password'"
# Export variables
for variables in "MQTT_HOST=$MQTT_HOST" "MQTT_PORT=$MQTT_PORT" "MQTT_SSL=$MQTT_SSL" "MQTT_USERNAME=$MQTT_USERNAME" "MQTT_PASSWORD=$MQTT_PASSWORD"; do
sed -i "1a export $variables" /etc/cont-init.d/*/*run* 2>/dev/null || true