Optimization

This commit is contained in:
Alexandre committed 2021-11-19 10:51:15 +01:00
1 parent 3c0a1bd9dd
commit 934460af77
1 file changed
+2 -1
+2 -1
View File
@@ -64,9 +64,10 @@ function parse_yaml {
# Get variables and export
bashio::log.info "Starting the app with the variables in /config/gazpar2mqtt"
for word in $(parse_yaml "$CONFIGSOURCE" ""); do
# Clean output
word=${word//[\"\']/}
# Data validation
if [[ $word =~ ^.+[=].+$ ]]; then
word=${word//[\"\']/}
export $word # Export the variable
bashio::log.blue "$word"
else