Erste Gedanken

This commit is contained in:
2025-07-17 21:42:25 +02:00
parent 93e814a6d2
commit a6ebc41ec8
11 changed files with 125 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
#!/usr/bin/with-contenv bash
# Importiere Home Assistant-Konfigurationsoptionen
. /opt/hassio-addons/base.sh
# Konfigurationsverzeichnis
CONFIG_PATH=/data/fahclient
mkdir -p "$CONFIG_PATH"
# Erstelle config.xml, falls nicht vorhanden
if [ ! -f "$CONFIG_PATH/config.xml" ]; then
cat > "$CONFIG_PATH/config.xml" << EOF
<config>
<user value="$(hass.config.get 'user')"/>
<team value="$(hass.config.get 'team')"/>
<passkey value="$(hass.config.get 'passkey')"/>
<power value="$(hass.config.get 'power')"/>
<web-enable value="true"/>
<http-addresses value="0.0.0.0:7396"/>
</config>
EOF
fi

View File

@@ -0,0 +1 @@
cont-init

View File

@@ -0,0 +1,3 @@
#!/usr/bin/execlineb -P
with-contenv
foreground { /usr/bin/fahclient --config /data/fahclient/config.xml }