mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-19 07:11:50 +02:00
Update 99-run.sh
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user