Update 01-config_yaml.sh

This commit is contained in:
Alexandre
2023-10-12 15:33:07 +02:00
committed by GitHub
parent dc76df5ba7
commit ee88513dc2

View File

@@ -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