Merge Dev to Main (Alpine 1.18 and Debian 12(Bookworm) update) #2
@@ -519,8 +519,9 @@ packages:
|
|||||||
- jpeg-dev
|
- jpeg-dev
|
||||||
- zlib-dev
|
- zlib-dev
|
||||||
- bash
|
- bash
|
||||||
- mariadb-connector-c-dev
|
- mariadb-dev
|
||||||
- eudev-dev
|
- eudev-dev
|
||||||
|
- ffmpeg-dev
|
||||||
action: install
|
action: install
|
||||||
variants:
|
variants:
|
||||||
- hass
|
- hass
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/ash
|
#!/bin/ash
|
||||||
#Install HomeAssistant
|
#Install HomeAssistant
|
||||||
mkdir -p /opt/HomeAssistant/srv
|
mkdir -p /opt/HomeAssistant/srv
|
||||||
mkdir -p /opt/HomeAssistant/data
|
mkdir -p /opt/HomeAssistant/data/custom_components/hacs
|
||||||
touch /opt/HomeAssistant/data/home-assistant.log
|
touch /opt/HomeAssistant/data/home-assistant.log
|
||||||
addgroup hass
|
addgroup hass
|
||||||
adduser -h /opt/HomeAssistant/data -D -G hass -s /bin/sh hass
|
adduser -h /opt/HomeAssistant/data -D -G hass -s /bin/sh hass
|
||||||
@@ -10,14 +10,15 @@ 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 sqlalchemy fnvhash && pip3 install homeassistant'
|
sudo -u hass sh -c '. /opt/HomeAssistant/srv/bin/activate && pip install --upgrade pip && pip3 install wheel mysqlclient sqlalchemy fnvhash && pip3 install homeassistant'
|
||||||
|
|
||||||
#Install Home Assistant Community Store
|
#Install Home Assistant Community Store
|
||||||
sudo -u hass sh -c 'cd /opt/HomeAssistant/data && wget -O - https://get.hacs.xyz | bash -'
|
wget https://github.com/hacs/integration/releases/latest/download/hacs.zip -O /tmp/hacs.zip
|
||||||
|
sudo -u hass unzip /tmp/hacs.zip -d /opt/HomeAssistant/data/custom_components/hacs
|
||||||
|
|
||||||
#Update script
|
#Update script
|
||||||
mv /opt/Setup/Scripts/UpdateHASS.sh /opt/UpdateHASS.sh
|
mv /opt/Setup/Scripts/UpdateHASS.sh /opt/UpdateHASS.sh
|
||||||
|
|
||||||
#CleanUp
|
#CleanUp
|
||||||
rm -rf /opt/HomeAssistant/data/.cache/*
|
rm -rf /opt/HomeAssistant/data/.cache/*
|
||||||
rm -rf /build/TMP/usr/lib/python3.9/__pycache__/*
|
rm -rf /usr/lib/python3.11/__pycache__/*
|
||||||
|
|
||||||
#Setup HomeAssistant service
|
#Setup HomeAssistant service
|
||||||
mv /opt/Setup/Configs/hass.service /etc/init.d/hass
|
mv /opt/Setup/Configs/hass.service /etc/init.d/hass
|
||||||
|
|||||||
@@ -37,12 +37,21 @@ http {
|
|||||||
add_header Content-Type text/html;
|
add_header Content-Type text/html;
|
||||||
return 200 '<html><head></head><body>To setup this container edit and run the FirstRun script `/opt/Setup/Scripts/FirstRun.sh`</body></html>';
|
return 200 '<html><head></head><body>To setup this container edit and run the FirstRun script `/opt/Setup/Scripts/FirstRun.sh`</body></html>';
|
||||||
#SetupBlockEnd
|
#SetupBlockEnd
|
||||||
add_header Referrer-Policy "no-referrer" always;
|
|
||||||
add_header X-Download-Options "noopen" always;
|
##Reverse proxy IP resolve
|
||||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
#set_real_ip_from <ReverseProxyIP>;
|
||||||
add_header X-Robots-Tag "noindex, nofollow" always;
|
#real_ip_header X-Forwarded-For;
|
||||||
fastcgi_send_timeout 300;
|
|
||||||
fastcgi_read_timeout 300;
|
add_header Referrer-Policy "no-referrer" always;
|
||||||
|
add_header X-Content-Type-Options "nosniff" always;
|
||||||
|
add_header X-Download-Options "noopen" always;
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||||
|
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
||||||
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
||||||
|
add_header X-XSS-Protection "1; mode=block" always;
|
||||||
|
|
||||||
|
fastcgi_send_timeout 36000;
|
||||||
|
fastcgi_read_timeout 36000;
|
||||||
fastcgi_hide_header X-Powered-By;
|
fastcgi_hide_header X-Powered-By;
|
||||||
fastcgi_buffers 64 4K;
|
fastcgi_buffers 64 4K;
|
||||||
gzip on;
|
gzip on;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/ash
|
#!/bin/ash
|
||||||
#Install Yarn Globaly for zwavejs2mqtt
|
#Install corpack globaly for zwavejs2mqtt
|
||||||
npm install -g yarn
|
npm install -g corepack
|
||||||
|
|
||||||
#Run folowing commands as 'node' user
|
#Run folowing commands as 'node' user
|
||||||
sudo -u node ash << EOF
|
sudo -u node ash << EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user