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 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 diff --git a/conf/homeassistant_conf_files/configuration.yaml b/conf/homeassistant_conf_files/configuration.yaml index 0d66f50..e9eae7c 100644 --- a/conf/homeassistant_conf_files/configuration.yaml +++ b/conf/homeassistant_conf_files/configuration.yaml @@ -31,10 +31,9 @@ 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 +# Sensors +sensor: + - platform: fail2ban + jails: + - __APP__ + file_path: /var/log/__APP__/__APP__.log 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; diff --git a/manifest.toml b/manifest.toml index 5565d0d..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"] @@ -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" 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