(feat) Add HACS support to Home Assistant (#1132)
* (feat) Add HACS support to Home Assistant * use the actual container and bash * use just normal sh * fix a syntax error
This commit is contained in:
@@ -29,4 +29,4 @@ sources:
|
||||
- https://github.com/home-assistant/home-assistant
|
||||
- https://github.com/cdr/code-server
|
||||
type: application
|
||||
version: 8.1.4
|
||||
version: 8.2.0
|
||||
|
||||
@@ -10,8 +10,8 @@ image:
|
||||
tag: v2021.10.4@sha256:6f5892e307edd0b135f4ccab1ecee70518e0418b26e6264c23c67d1982eece86
|
||||
|
||||
initContainers:
|
||||
init-db:
|
||||
image: "{{ .Values.alpineImage.repository }}:{{ .Values.alpineImage.tag }}"
|
||||
init:
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
command: ["/config/init/init.sh"]
|
||||
volumeMounts:
|
||||
- name: init
|
||||
|
||||
@@ -26,6 +26,32 @@ data:
|
||||
cat /config/init/recorder.default >> /config/configuration.yaml
|
||||
cat /config/init/http.default >> /config/configuration.yaml
|
||||
fi
|
||||
|
||||
cd "/config" || echo "Could not change path to /config"
|
||||
echo "Creating custom_components directory..."
|
||||
mkdir "/config/custom_components" || echo "custom_components directory already exists"
|
||||
|
||||
echo "Changing to the custom_components directory..."
|
||||
cd "/config/custom_components" || echo "Could not change path to /config/custom_components"
|
||||
|
||||
echo "Downloading HACS"
|
||||
wget "https://github.com/hacs/integration/releases/latest/download/hacs.zip" || exit 0
|
||||
|
||||
if [ -d "/config/custom_components/hacs" ]; then
|
||||
echo "HACS directory already exist, cleaning up..."
|
||||
rm -R "/config/custom_components/hacs"
|
||||
fi
|
||||
|
||||
echo "Creating HACS directory..."
|
||||
mkdir "/config/custom_components/hacs"
|
||||
|
||||
echo "Unpacking HACS..."
|
||||
unzip "/config/custom_components/hacs.zip" -d "/config/custom_components/hacs" >/dev/null 2>&1
|
||||
|
||||
echo "Removing HACS zip file..."
|
||||
rm "/config/custom_components/hacs.zip"
|
||||
echo "Installation complete."
|
||||
|
||||
configuration.yaml.default: |-
|
||||
# Configure a default setup of Home Assistant (frontend, api, etc)
|
||||
default_config:
|
||||
|
||||
@@ -23,8 +23,8 @@ service:
|
||||
port: 8123
|
||||
|
||||
initContainers:
|
||||
init-db:
|
||||
image: "{{ .Values.alpineImage.repository }}:{{ .Values.alpineImage.tag }}"
|
||||
init:
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
command: ["/config/init/init.sh"]
|
||||
volumeMounts:
|
||||
- name: init
|
||||
|
||||
Reference in New Issue
Block a user