From 4943524a127c566f98becbd92352f9a82af4dc47 Mon Sep 17 00:00:00 2001 From: Mike Degatano Date: Tue, 30 Aug 2022 15:15:13 -0400 Subject: [PATCH 1/2] Update addon base 12.2.3 --- loki/build.yaml | 8 ++++---- loki/rootfs/etc/services.d/loki/finish | 13 +++++++++---- loki/rootfs/etc/services.d/nginx/finish | 12 ++++++++---- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/loki/build.yaml b/loki/build.yaml index 6725459..7f4126c 100644 --- a/loki/build.yaml +++ b/loki/build.yaml @@ -1,9 +1,9 @@ --- build_from: - amd64: ghcr.io/hassio-addons/base/amd64:11.1.2 - armhf: ghcr.io/hassio-addons/base/armhf:11.1.2 - armv7: ghcr.io/hassio-addons/base/armv7:11.1.2 - aarch64: ghcr.io/hassio-addons/base/aarch64:11.1.2 + amd64: ghcr.io/hassio-addons/base/amd64:12.2.3 + armhf: ghcr.io/hassio-addons/base/armhf:12.2.3 + armv7: ghcr.io/hassio-addons/base/armv7:12.2.3 + aarch64: ghcr.io/hassio-addons/base/aarch64:12.2.3 codenotary: base_image: codenotary@frenck.dev signer: codenotary@degatano.com diff --git a/loki/rootfs/etc/services.d/loki/finish b/loki/rootfs/etc/services.d/loki/finish index 636489e..782f6ed 100755 --- a/loki/rootfs/etc/services.d/loki/finish +++ b/loki/rootfs/etc/services.d/loki/finish @@ -1,9 +1,14 @@ -#!/usr/bin/execlineb -S0 +#!/usr/bin/env bashio # ============================================================================== # Home Assistant Add-on: Loki # Take down the S6 supervision tree when Loki fails # ============================================================================== -if { s6-test ${1} -ne 0 } -if { s6-test ${1} -ne 256 } -s6-svscanctl -t /var/run/s6/services +declare APP_EXIT_CODE=${1} + +if [[ "${APP_EXIT_CODE}" -ne 0 ]] && [[ "${APP_EXIT_CODE}" -ne 256 ]]; then + bashio::log.warning "Halt add-on with exit code ${APP_EXIT_CODE}" + echo "${APP_EXIT_CODE}" > /run/s6-linux-init-container-results/exitcode + exec /run/s6/basedir/bin/halt +fi + diff --git a/loki/rootfs/etc/services.d/nginx/finish b/loki/rootfs/etc/services.d/nginx/finish index fdfd747..692dde7 100755 --- a/loki/rootfs/etc/services.d/nginx/finish +++ b/loki/rootfs/etc/services.d/nginx/finish @@ -1,9 +1,13 @@ -#!/usr/bin/execlineb -S0 +#!/usr/bin/env bashio # ============================================================================== # Home Assistant Add-on: Loki # Take down the S6 supervision tree when Nginx fails # ============================================================================== -if { s6-test ${1} -ne 0 } -if { s6-test ${1} -ne 256 } -s6-svscanctl -t /var/run/s6/services +declare APP_EXIT_CODE=${1} + +if [[ "${APP_EXIT_CODE}" -ne 0 ]] && [[ "${APP_EXIT_CODE}" -ne 256 ]]; then + bashio::log.warning "Halt add-on with exit code ${APP_EXIT_CODE}" + echo "${APP_EXIT_CODE}" > /run/s6-linux-init-container-results/exitcode + exec /run/s6/basedir/bin/halt +fi From e53988d8821d2138c8a2af67708a6da00a8c5771 Mon Sep 17 00:00:00 2001 From: Mike Degatano Date: Tue, 30 Aug 2022 15:30:15 -0400 Subject: [PATCH 2/2] Bump ca-certificates and nginx --- loki/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loki/Dockerfile b/loki/Dockerfile index f5faa1a..1fa24da 100644 --- a/loki/Dockerfile +++ b/loki/Dockerfile @@ -31,8 +31,8 @@ RUN set -eux; \ apk del .build-deps; \ \ apk add --no-cache \ - ca-certificates=20211220-r0 \ - nginx=1.20.2-r1 \ + ca-certificates=20220614-r0 \ + nginx=1.22.0-r1 \ ; \ update-ca-certificates; \ nginx -v; \