diff --git a/servapps/HomeAssistant/artefacts/configuration.yaml b/servapps/HomeAssistant/artefacts/configuration.yaml index 497254f7..7ca3cd2c 100644 --- a/servapps/HomeAssistant/artefacts/configuration.yaml +++ b/servapps/HomeAssistant/artefacts/configuration.yaml @@ -1,8 +1,10 @@ - -# Loads default set of integrations. Do not remove. +### Configuration written from cosmos, do NOT change ### default_config: http: use_x_forwarded_for: True trusted_proxies: - !env_var PROXY_HOSTNAME +### END### + +### add your custom config as desired starting from here: ### \ No newline at end of file diff --git a/servapps/HomeAssistant/artefacts/init.sh b/servapps/HomeAssistant/artefacts/init.sh new file mode 100644 index 00000000..a2f767f6 --- /dev/null +++ b/servapps/HomeAssistant/artefacts/init.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# init.sh + +if [ $CONFIG_EDITOR ]; then + sed -i '~### Configuration written from cosmos, do NOT change ###\(.*\)##config_editor##\(.*\)##/config_editor##\(.*\)### END###~{s~### Configuration written from cosmos, do NOT change ###\1##config_editor##\nconfig_editor:\n\nfrontend:\n extra_module_url:\n - /local/config-editor-card.js?v=1\n##/config_editor##\3### END###~;h};${x;~.~{x;q0};x;q1}' /config/configuration.yaml + if [ $? ]; then + sed -i '~### Configuration written from cosmos, do NOT change ###\(.*\)### END###~s~### Configuration written from cosmos, do NOT change ###\1##config_editor##\nconfig_editor:\n\nfrontend:\n extra_module_url:\n - /local/config-editor-card.js?v=1\n##/config_editor##\n\n### END###~g' /config/configuration.yaml + fi +fi + +if [ $HACS ]; then + echo "test" +fi + +exit \ No newline at end of file diff --git a/servapps/HomeAssistant/cosmos-compose.json b/servapps/HomeAssistant/cosmos-compose.json index bdc3aae9..38888b52 100644 --- a/servapps/HomeAssistant/cosmos-compose.json +++ b/servapps/HomeAssistant/cosmos-compose.json @@ -65,7 +65,9 @@ "PUID=1000", "PGID=1000", "TZ=auto", - "PROXY_HOSTNAME=0.0.0.0/0" + "PROXY_HOSTNAME=0.0.0.0/0", + "CONFIG_EDITOR=1", + "HACS=1" ], "labels": { "cosmos-force-network-secured": "true", @@ -80,7 +82,8 @@ } ], "post_install": [ - "wget --directory-prefix \"/config/\" http://aseracorp.github.io/resiSTORE/servapps/HomeAssistant/artefacts/configuration.yaml" + "wget --directory-prefix \"/config/\" http://aseracorp.github.io/resiSTORE/servapps/HomeAssistant/artefacts/configuration.yaml", + "wget -O /config/init.sh http://aseracorp.github.io/resiSTORE/servapps/HomeAssistant/artefacts/init.sh && chmod +x /config/init.sh && /config/init.sh" ], "routes": [ {