Skip to content

Commit

Permalink
update Home Assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
madejackson committed Jul 29, 2024
1 parent 247fac8 commit 94e7060
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
6 changes: 4 additions & 2 deletions servapps/HomeAssistant/artefacts/configuration.yaml
Original file line number Diff line number Diff line change
@@ -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: ###
15 changes: 15 additions & 0 deletions servapps/HomeAssistant/artefacts/init.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 5 additions & 2 deletions servapps/HomeAssistant/cosmos-compose.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": [
{
Expand Down

0 comments on commit 94e7060

Please sign in to comment.