mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Update 01-config_yaml.sh
This commit is contained in:
@@ -39,6 +39,16 @@ else
|
||||
|
||||
fi
|
||||
|
||||
# Permissions
|
||||
mkdir -p "$(dirname "${CONFIGSOURCE}")"
|
||||
chmod -R 755 "$(dirname "${CONFIGSOURCE}")"
|
||||
|
||||
####################
|
||||
# LOAD CONFIG.YAML #
|
||||
####################
|
||||
|
||||
bashio::log.info "Load environment variables from $CONFIGSOURCE if existing"
|
||||
|
||||
# Check if config file is there, or create one from template
|
||||
if [ ! -f "$CONFIGSOURCE" ]; then
|
||||
echo "... no config file, creating one from template. Please customize the file in $CONFIGSOURCE before restarting."
|
||||
@@ -55,15 +65,6 @@ if [ ! -f "$CONFIGSOURCE" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Permissions
|
||||
chmod -R 755 "$(dirname "${CONFIGSOURCE}")"
|
||||
|
||||
####################
|
||||
# LOAD CONFIG.YAML #
|
||||
####################
|
||||
|
||||
bashio::log.info "Load environment variables from $CONFIGSOURCE if existing"
|
||||
|
||||
# Check if there are lines to read
|
||||
cp "$CONFIGSOURCE" /tempenv
|
||||
sed -i '/^#/d' /tempenv
|
||||
|
||||
Reference in New Issue
Block a user