From 3d36f05b952b5f3f4537d42cf17f5a6aebcb41d5 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 31 Mar 2020 18:51:06 +0200 Subject: [PATCH] Fix config check add-on (#1201) * Fix config check add-on * Fix restart --- check_config/CHANGELOG.md | 24 ++++++++----------- check_config/Dockerfile | 4 +--- check_config/build.json | 10 ++++---- check_config/config.json | 3 ++- .../etc/services.d/config-checker/finish | 5 ++++ .../etc/services.d/config-checker/run} | 11 ++++++--- 6 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 check_config/rootfs/etc/services.d/config-checker/finish rename check_config/{data/run.sh => rootfs/etc/services.d/config-checker/run} (85%) mode change 100755 => 100644 diff --git a/check_config/CHANGELOG.md b/check_config/CHANGELOG.md index 2c64698..df3b615 100644 --- a/check_config/CHANGELOG.md +++ b/check_config/CHANGELOG.md @@ -1,34 +1,30 @@ # Changelog -## 3.1 +## 3.2.0 + +- Update base image to version 7.1.0 +- Migrate to S6-overlay + +## 3.1.0 - Moved the 'reassurance' log message "Don't worry, this temporary installation is not overwriting your current one." to earlier in the process. -## 3.0 +## 3.0.0 - Use Home Assistant base image as base for this Add-on - Disable external UDEV -## 2.2 +## 2.2.0 - Update python/alpine to HA 0.96 -## 2.1 +## 2.1.0 - Adds additional information in log output to avoid confusion -## 2.0 +## 2.0.0 - Migrated add-on onto Bashio - Improved add-on log output - Added documentation to add-on itself - Added support for Home Assistant wheels repository - -## 1.0 - -- Update to Python 3.7 -- Add colorlog to pip packages - -## 0.9 - -- Fix build errors with 0.76 diff --git a/check_config/Dockerfile b/check_config/Dockerfile index 8d9dc6d..1187019 100644 --- a/check_config/Dockerfile +++ b/check_config/Dockerfile @@ -2,6 +2,4 @@ ARG BUILD_FROM FROM $BUILD_FROM # Copy data -COPY data/run.sh / - -CMD [ "/run.sh" ] +COPY rootfs / diff --git a/check_config/build.json b/check_config/build.json index ede76da..2a4ad7d 100644 --- a/check_config/build.json +++ b/check_config/build.json @@ -1,9 +1,9 @@ { "build_from": { - "aarch64": "homeassistant/aarch64-homeassistant-base:4.0", - "amd64": "homeassistant/amd64-homeassistant-base:4.0", - "armhf": "homeassistant/armhf-homeassistant-base:4.0", - "armv7": "homeassistant/armv7-homeassistant-base:4.0", - "i386": "homeassistant/i386-homeassistant-base:4.0" + "aarch64": "homeassistant/aarch64-homeassistant-base:7.1.0", + "amd64": "homeassistant/amd64-homeassistant-base:7.1.0", + "armhf": "homeassistant/armhf-homeassistant-base:7.1.0", + "armv7": "homeassistant/armv7-homeassistant-base:7.1.0", + "i386": "homeassistant/i386-homeassistant-base:7.1.0" } } diff --git a/check_config/config.json b/check_config/config.json index 4cc6bc6..51a18e0 100644 --- a/check_config/config.json +++ b/check_config/config.json @@ -1,6 +1,6 @@ { "name": "Check Home Assistant configuration", - "version": "3.1", + "version": "3.2.0", "slug": "check_config", "description": "Check current Home Assistant configuration against a new version", "url": "https://github.com/home-assistant/hassio-addons/tree/master/check_config", @@ -8,6 +8,7 @@ "udev": true, "startup": "once", "boot": "manual", + "init": false, "map": ["config", "ssl"], "options": { "version": "latest" diff --git a/check_config/rootfs/etc/services.d/config-checker/finish b/check_config/rootfs/etc/services.d/config-checker/finish new file mode 100644 index 0000000..41da5ed --- /dev/null +++ b/check_config/rootfs/etc/services.d/config-checker/finish @@ -0,0 +1,5 @@ +#!/usr/bin/execlineb -S0 +# ============================================================================== +# Take down the S6 supervision tree when config check is done +# ============================================================================== +s6-svscanctl -t /var/run/s6/services \ No newline at end of file diff --git a/check_config/data/run.sh b/check_config/rootfs/etc/services.d/config-checker/run old mode 100755 new mode 100644 similarity index 85% rename from check_config/data/run.sh rename to check_config/rootfs/etc/services.d/config-checker/run index 0326568..a77e028 --- a/check_config/data/run.sh +++ b/check_config/rootfs/etc/services.d/config-checker/run @@ -1,8 +1,13 @@ -#!/usr/bin/env bashio -set -e - +#!/usr/bin/with-contenv bashio +# ============================================================================== +# Start config checker service +# ============================================================================== VERSION=$(bashio::config 'version') +# Create udev devices +bashio::log.info "Setup udev devices" +bashio::hardware.trigger + # Generate install string CMD="homeassistant" if [ "${VERSION}" != "latest" ]; then