Update 99-run.sh

This commit is contained in:
Alexandre
2021-11-18 08:24:29 +01:00
committed by GitHub
parent 18fa0517ac
commit dc03e52be4

View File

@@ -25,14 +25,14 @@ if [ -f $CONFIGSOURCE ]; then
bashio::log.info "Using config file found in $CONFIGSOURCE"
# Check if yaml is valid
# yamllint -d relaxed --no-warnings $CONFIGSOURCE &> ERROR || EXIT_CODE=$?
# if [ $EXIT_CODE = 0 ]; then
# echo "Config file is a valid yaml"
# else
# cat ERROR
# bashio::log.fatal "Config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above."
# bashio::exit.nok
# fi
yamllint -d relaxed --no-warnings $CONFIGSOURCE &> ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml"
else
cat ERROR
bashio::log.fatal "Config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above. You can check yaml validity with the online tool yamllint.com"
bashio::exit.nok
fi
else
# Create symlink for addon to create config
touch ${CONFIGSOURCE}