Erste Gedanken
This commit is contained in:
21
rootfs/etc/s6-overlay/cont-init.d/foldingathome.sh
Normal file
21
rootfs/etc/s6-overlay/cont-init.d/foldingathome.sh
Normal 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
|
||||
Reference in New Issue
Block a user