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