mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Update 01-config_yaml.sh
This commit is contained in:
@@ -39,6 +39,16 @@ else
|
|||||||
|
|
||||||
fi
|
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
|
# Check if config file is there, or create one from template
|
||||||
if [ ! -f "$CONFIGSOURCE" ]; then
|
if [ ! -f "$CONFIGSOURCE" ]; then
|
||||||
echo "... no config file, creating one from template. Please customize the file in $CONFIGSOURCE before restarting."
|
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
|
||||||
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
|
# Check if there are lines to read
|
||||||
cp "$CONFIGSOURCE" /tempenv
|
cp "$CONFIGSOURCE" /tempenv
|
||||||
sed -i '/^#/d' /tempenv
|
sed -i '/^#/d' /tempenv
|
||||||
|
|||||||
Reference in New Issue
Block a user