mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 22:34:11 +02:00
Update 99-run.sh
This commit is contained in:
@@ -4,19 +4,19 @@
|
|||||||
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
||||||
|
|
||||||
# Check if config file is there, or create one from template
|
# Check if config file is there, or create one from template
|
||||||
#if [ -f $CONFIGSOURCE ]; then
|
if [ -f $CONFIGSOURCE ]; then
|
||||||
# echo "Using config file found in $CONFIGSOURCE"
|
echo "Using config file found in $CONFIGSOURCE"
|
||||||
#else
|
else
|
||||||
# echo "No config file, creating one from template"
|
echo "No config file, creating one from template"
|
||||||
# # Create folder
|
# Create folder
|
||||||
# mkdir -p "$(dirname "${CONFIGSOURCE}")"
|
mkdir -p "$(dirname "${CONFIGSOURCE}")"
|
||||||
# # Placing template in config
|
# Placing template in config
|
||||||
# cp /data/config.yaml "$(dirname "${CONFIGSOURCE}")" &>/dev/null \
|
cp /data/config.yaml "$(dirname "${CONFIGSOURCE}")" &>/dev/null \
|
||||||
# || cp /templates/config.yaml "$(dirname "${CONFIGSOURCE}")"
|
|| cp /templates/config.yaml "$(dirname "${CONFIGSOURCE}")"
|
||||||
# # Need to restart
|
# Need to restart
|
||||||
# bashio::log.fatal "Config file not found, creating a new one. Please customize the file in $CONFIGSOURCE before restarting."
|
bashio::log.fatal "Config file not found, creating a new one. Please customize the file in $CONFIGSOURCE before restarting."
|
||||||
# bashio::exit.nok
|
bashio::exit.nok
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
# Check if yaml is valid
|
# Check if yaml is valid
|
||||||
#yamllint -d relaxed --no-warnings $CONFIGSOURCE &> ERROR || EXIT_CODE=$?
|
#yamllint -d relaxed --no-warnings $CONFIGSOURCE &> ERROR || EXIT_CODE=$?
|
||||||
@@ -29,9 +29,9 @@ CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
|||||||
#fi
|
#fi
|
||||||
|
|
||||||
# Create symlink
|
# Create symlink
|
||||||
#[ -f /data/config.yaml ] && rm /data/config.yaml
|
[ -f /data/config.yaml ] && rm /data/config.yaml
|
||||||
#ln -s $CONFIGSOURCE /data
|
ln -s $CONFIGSOURCE /data
|
||||||
#echo "Symlink created"
|
echo "Symlink created"
|
||||||
|
|
||||||
##############
|
##############
|
||||||
# Launch App #
|
# Launch App #
|
||||||
|
|||||||
Reference in New Issue
Block a user