From 9ec86f8899ef2979b984fee0667029b8b69a50e8 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 9 Jun 2023 10:20:38 +0200 Subject: [PATCH 1/7] Update nginx --- conf/nginx.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4aae8e1..59d60dc 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,4 @@ -# see https://github.com/home-assistant/addons/blob/master/nginx_proxy/data/nginx.conf +# see https://github.com/home-assistant/addons/blob/master/nginx_proxy/rootfs/etc/nginx.conf location / { proxy_pass http://localhost:__PORT__; @@ -7,7 +7,8 @@ location / { proxy_http_version 1.1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; + proxy_set_header Connection $connection_upgrade; + proxy_set_header X-Forwarded-Host $http_host; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; From 419894f6bd694daa990bd045755e540df5e98247 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 9 Jun 2023 10:30:58 +0200 Subject: [PATCH 2/7] Add ffmpeg dependencie --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 5565d0d..0446891 100644 --- a/manifest.toml +++ b/manifest.toml @@ -97,7 +97,7 @@ ram.runtime = "2G" main.default = 8123 [resources.apt] - packages = "mariadb-server python3, python3-dev, python3-venv, python3-pip, libffi-dev, libssl-dev, libjpeg-dev, zlib1g-dev, autoconf, build-essential, libopenjp2-7, libtiff5, libturbojpeg0, libmariadb-dev, libmariadb-dev-compat, rustc, tk-dev, libncurses5-dev, libncursesw5-dev, libreadline6-dev, libdb5.3-dev, libgdbm-dev, libsqlite3-dev, libbz2-dev, libexpat1-dev, liblzma-dev, wget, tar, libnss3-dev, libreadline-dev" + packages = "mariadb-server python3, python3-dev, python3-venv, python3-pip, libffi-dev, libssl-dev, libjpeg-dev, zlib1g-dev, autoconf, build-essential, libopenjp2-7, libtiff5, libturbojpeg0, libmariadb-dev, libmariadb-dev-compat, rustc, tk-dev, libncurses5-dev, libncursesw5-dev, libreadline6-dev, libdb5.3-dev, libgdbm-dev, libsqlite3-dev, libbz2-dev, libexpat1-dev, liblzma-dev, wget, tar, libnss3-dev, libreadline-dev, ffmpeg" [resources.database] type = "mysql" From 5ac1afdeb62e57c2e31d2f96a615f8d16a602f00 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 9 Jun 2023 10:36:39 +0200 Subject: [PATCH 3/7] Remove deprecated switch --- conf/homeassistant_conf_files/configuration.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/conf/homeassistant_conf_files/configuration.yaml b/conf/homeassistant_conf_files/configuration.yaml index 0d66f50..778ab7d 100644 --- a/conf/homeassistant_conf_files/configuration.yaml +++ b/conf/homeassistant_conf_files/configuration.yaml @@ -31,10 +31,3 @@ automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml -# Switches -switch: - - platform: command_line - switches: - upgrade_homeassistant: - command_on: "nohup bash -c __DATA_DIR__/bin/upgrade_homeassistant.sh $1 > /dev/null 2>&1 &" - friendly_name: Upgrade Home Assistant From cba58c85125f3a6df058d43b17fb923b997d48e6 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 9 Jun 2023 10:58:30 +0200 Subject: [PATCH 4/7] Update updater --- .github/workflows/updater.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index df78dcc..ab7938d 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -31,7 +31,7 @@ echo "PROCEED=false" >> $GITHUB_ENV # Proceed only if the retrieved version is greater than the current one if ! dpkg --compare-versions "$current_version" "lt" "$upstream_version" then - echo "::warning ::No new version available" + echo "::warning :: No new version available" exit 0 # Proceed only if a PR for this new version does not already exist elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$upstream_version @@ -50,8 +50,14 @@ sed -i "s/^app_version=.*/app_version=$upstream_version/" scripts/_common.sh # Replace python required version py_required_major=$(curl -Ls https://pypi.org/pypi/$app/json | jq -r .info.requires_python | cut -d '=' -f 2 | rev | cut -d"." -f2- | rev) py_required_minor=$(curl -s "https://www.python.org/ftp/python/" | grep ">$py_required_major" | cut -d '/' -f 2 | cut -d '>' -f 2 | sort -rV | head -n 1) -sed -i "s/^py_required_version=.*/py_required_version=$py_required_minor/" scripts/_common.sh - +current_py_required_minor=$(cat scripts/_common.sh | grep "py_required_version=" | cut -d '=' -f 2) +if ! dpkg --compare-versions "$current_py_required_minor" "lt" "$py_required_minor" +then + echo "::warning :: No need to update required python version" +else + echo "::warning :: Updating required python version to new upstream python version" + sed -i "s/^py_required_version=.*/py_required_version=$py_required_minor/" scripts/_common.sh +fi # Replace pip required version pip_required=$(curl -Ls https://pypi.org/pypi/$app/json | jq -r .info.requires_dist[] | grep "pip") #"pip (<23.1,>=21.0)" sed -i "s/^pip_required=.*/pip_required=\"$pip_required\"/" scripts/_common.sh From 435916afa807cf336169d1ba28132f96e572160b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 9 Jun 2023 09:00:02 +0000 Subject: [PATCH 5/7] Upgrade to v2023.6.1 --- manifest.toml | 2 +- scripts/_common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 0446891..62c7cba 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Home Assistant" description.en = "Home automation platform" description.fr = "Plateforme domotique" -version = "2023.6.0~ynh1" +version = "2023.6.1~ynh1" maintainers = ["ewilly"] diff --git a/scripts/_common.sh b/scripts/_common.sh index 005c1d0..b1fbac8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # Release to install -app_version=2023.6.0 +app_version=2023.6.1 # Requirements py_required_version=3.11.4 From c5b69af40f3240497455c137c12b7eb60c4e52bf Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 9 Jun 2023 10:37:18 +0000 Subject: [PATCH 6/7] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fed9367..9d2e708 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Open source home automation that puts local control and privacy first. Powered b - Home Energy Management." -**Shipped version:** 2023.6.0~ynh1 +**Shipped version:** 2023.6.1~ynh1 **Demo:** https://demo.home-assistant.io diff --git a/README_fr.md b/README_fr.md index 5230178..09d2c43 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ Open source home automation that puts local control and privacy first. Powered b - Home Energy Management." -**Version incluse :** 2023.6.0~ynh1 +**Version incluse :** 2023.6.1~ynh1 **Démo :** https://demo.home-assistant.io From 61d9f07c964b265bc25bc2f5dc020a39a28b2981 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 9 Jun 2023 14:46:29 +0200 Subject: [PATCH 7/7] Add fail2ban sensor --- conf/homeassistant_conf_files/configuration.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/homeassistant_conf_files/configuration.yaml b/conf/homeassistant_conf_files/configuration.yaml index 778ab7d..e9eae7c 100644 --- a/conf/homeassistant_conf_files/configuration.yaml +++ b/conf/homeassistant_conf_files/configuration.yaml @@ -31,3 +31,9 @@ automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml +# Sensors +sensor: + - platform: fail2ban + jails: + - __APP__ + file_path: /var/log/__APP__/__APP__.log