Update 99-run.sh

This commit is contained in:
Alexandre
2021-12-02 22:17:26 +01:00
committed by GitHub
parent 1764528aa1
commit 15666c6ef4

View File

@@ -74,7 +74,7 @@ do
echo "secret detected" echo "secret detected"
secret=${line#*secret } secret=${line#*secret }
# Check if single match # Check if single match
[[ "$(sed -n "/$secret:/=" /config/secrets.yaml)" == *' '* ]] && bashio::log.fatal "There are multiple matches for your password name. Please check your secrets.yaml file" && continue [[ "$(sed -n "/$secret:/=" /config/secrets.yaml)" == *' '* ]] && bashio::log.fatal "There are multiple matches for your password name. Please check your secrets.yaml file" && bashio::addon.stop
# Get text # Get text
secret=$(sed -n "/$secret:/p" /config/secrets.yaml) secret=$(sed -n "/$secret:/p" /config/secrets.yaml)
secret=${secret#*: } secret=${secret#*: }
@@ -85,8 +85,8 @@ do
export $line # Export the variable export $line # Export the variable
bashio::log.blue "$line" bashio::log.blue "$line"
else else
bashio::log.fatal "$line does not follow the structure KEY=text, it will be ignored and removed from the config" bashio::log.fatal "$line does not follow the structure KEY=text"
sed -i "/$line/ d" ${CONFIGSOURCE} bashio::addon.stop
fi fi
done < "/tmpfile" done < "/tmpfile"