Update 99-run.sh

This commit is contained in:
Alexandre
2021-11-15 15:58:28 +01:00
committed by GitHub
parent a62f650e34
commit 6f0a48e365

View File

@@ -21,14 +21,16 @@ if bashio::config.true "test"; then
fi fi
# Check if yaml is valid # Check if yaml is valid
if [[ yamllint $CONFIGSOURCE ]]; then yamllint -d relaxed --no-warnings $CONFIGSOURCE &> ERROR
if [ $? = 0 ]; then
then
echo "Config file is a valid yaml" echo "Config file is a valid yaml"
else else
bashio::log.fatal "Config file has an invalid yaml format. Please check the file in $CONFIGSOURCE" bashio::log.fatal "Config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list :"
bashio::exit.nok cat ERROR
fi fi
# Symlink # Create symlink
rm /data/config.yaml rm /data/config.yaml
ln -s $CONFIGSOURCE /data ln -s $CONFIGSOURCE /data
echo "Symlink created" echo "Symlink created"