mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 18:31:02 +01:00
update
This commit is contained in:
@@ -17,8 +17,7 @@ if bashio::config.true 'mqtt_autodiscover'; then
|
||||
export MQTT_PASSWORD=$(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
|
||||
[ -f /etc/services.d/*/*run* ] && sed -i "1a export $variables" /etc/services.d/*/*run*
|
||||
[ -f /scripts/*run* ] && sed -i "1a export $variables" /scripts/*run*
|
||||
sed -i "1a export $variables" /etc/services.d/*/*run* 2>/dev/null || sed -i "1a export $variables" /scripts/*run*
|
||||
# Log
|
||||
bashio::log.blue "$variables"
|
||||
done
|
||||
|
||||
@@ -83,8 +83,7 @@ while IFS= read -r line; do
|
||||
if [[ $line =~ ^.+[=].+$ ]]; then
|
||||
export $line
|
||||
# Export the variable
|
||||
[ -f /etc/services.d/*/*run* ] && sed -i "1a export $line" /etc/services.d/*/*run*
|
||||
[ -f /scripts/*run* ] && sed -i "1a export $line" /scripts/*run*
|
||||
sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || sed -i "1a export $line" /scripts/*run*
|
||||
# Show in log
|
||||
bashio::log.blue "$line"
|
||||
else
|
||||
|
||||
@@ -83,8 +83,8 @@ while IFS= read -r line; do
|
||||
if [[ $line =~ ^.+[=].+$ ]]; then
|
||||
export $line
|
||||
# Export the variable
|
||||
[ -f /etc/services.d/*/*run* ] && sed -i "1a export $line" /etc/services.d/*/*run*
|
||||
[ -f /scripts/*run* ] && sed -i "1a export $line" /scripts/*run*
|
||||
sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || sed -i "1a export $line" /scripts/*run*
|
||||
|
||||
# Show in log
|
||||
bashio::log.blue "$line"
|
||||
else
|
||||
|
||||
@@ -83,8 +83,8 @@ while IFS= read -r line; do
|
||||
if [[ $line =~ ^.+[=].+$ ]]; then
|
||||
export $line
|
||||
# Export the variable
|
||||
[ -f /etc/services.d/*/*run* ] && sed -i "1a export $line" /etc/services.d/*/*run*
|
||||
[ -f /scripts/*run* ] && sed -i "1a export $line" /scripts/*run*
|
||||
sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || sed -i "1a export $line" /scripts/*run*
|
||||
|
||||
# Show in log
|
||||
bashio::log.blue "$line"
|
||||
else
|
||||
|
||||
@@ -83,8 +83,8 @@ while IFS= read -r line; do
|
||||
if [[ $line =~ ^.+[=].+$ ]]; then
|
||||
export $line
|
||||
# Export the variable
|
||||
[ -f /etc/services.d/*/*run* ] && sed -i "1a export $line" /etc/services.d/*/*run*
|
||||
[ -f /scripts/*run* ] && sed -i "1a export $line" /scripts/*run*
|
||||
sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || sed -i "1a export $line" /scripts/*run*
|
||||
|
||||
# Show in log
|
||||
bashio::log.blue "$line"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user