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:
@@ -13,12 +13,13 @@ if bashio::config.true "test"; 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
|
||||||
|
mkdir -p "$(dirname "${CONFIGSOURCE}")"
|
||||||
# Downloading template
|
# Downloading template
|
||||||
TEMPLATESOURCE="https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/enedisgateway2mqtt/rootfs/templates/config.yaml"
|
TEMPLATESOURCE="https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/enedisgateway2mqtt/rootfs/templates/config.yaml"
|
||||||
curl -L -f -s $TEMPLATESOURCE
|
curl -L -f -s $TEMPLATESOURCE --output $CONFIGSOURCE
|
||||||
# Placing template in config
|
# Placing template in config
|
||||||
mkdir -p "$(dirname "${CONFIGSOURCE}")"
|
#cp config.yaml "$(dirname "${CONFIGSOURCE}")"
|
||||||
cp 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
|
||||||
|
|||||||
Reference in New Issue
Block a user