diff --git a/CT-Files/hass/Scripts/Init.sh b/CT-Files/hass/Scripts/Init.sh index 7074471..0edcef1 100644 --- a/CT-Files/hass/Scripts/Init.sh +++ b/CT-Files/hass/Scripts/Init.sh @@ -7,7 +7,29 @@ addgroup hass adduser -h /opt/HomeAssistant/data -D -G hass -s /bin/sh hass chown -R hass:hass /opt/HomeAssistant sudo -u hass python3 -m venv /opt/HomeAssistant/srv -sudo -u hass sh -c '. /opt/HomeAssistant/srv/bin/activate && pip install --upgrade pip && pip3 install wheel mysqlclient && pip3 install homeassistant' + +#Fix broken Pyton module (It will not install with pyton 3.12 on a Musl system) +wget https://codeload.github.com/rhasspy/webrtc-noise-gain/tar.gz/refs/tags/v1.2.3 -O /tmp/webrtc-noise-gain.tar.gz || exit 1 +tar -C /tmp -xzf /tmp/webrtc-noise-gain.tar.gz +patch /tmp/webrtc-noise-gain-1.2.3/webrtc-audio-processing/webrtc-audio-processing-1/rtc_base/system/file_wrapper.h << EOF +--- ++++ +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include + + +EOF +chown hass: -R /tmp/webrtc-noise-gain-1.2.3 +sudo -u hass sh -c '. /opt/HomeAssistant/srv/bin/activate && pip install /tmp/webrtc-noise-gain-1.2.3' +rm -rf /tmp/webrtc-noise-gain.tar.gz /tmp/webrtc-noise-gain-1.2.3 +##End of fix (Remove when pyton module updates) + +sudo -u hass sh -c '. /opt/HomeAssistant/srv/bin/activate && pip install --upgrade pip && pip3 install wheel mutagen numpy mysqlclient && pip3 install homeassistant' #Install Home Assistant Community Store wget https://github.com/hacs/integration/releases/latest/download/hacs.zip -O /tmp/hacs.zip