From b593f795c5d9005eea12ac09aefed1a0707e157e Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 15 Mar 2021 15:03:00 +0100 Subject: [PATCH] Update CLI 4.11.0 (#1920) --- git_pull/CHANGELOG.md | 4 ++++ git_pull/build.json | 2 +- git_pull/config.json | 2 +- ssh/CHANGELOG.md | 5 +++++ ssh/build.json | 2 +- ssh/config.json | 6 ++++-- ssh/rootfs/etc/cont-init.d/apks.sh | 16 ++++++++++++++++ 7 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 ssh/rootfs/etc/cont-init.d/apks.sh diff --git a/git_pull/CHANGELOG.md b/git_pull/CHANGELOG.md index 6bb396c..ed06d1d 100644 --- a/git_pull/CHANGELOG.md +++ b/git_pull/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 7.12.2 + +- Update Home Assistant CLI to 4.11.0 + ## 7.12.1 - Update options schema for passwords diff --git a/git_pull/build.json b/git_pull/build.json index 5a4c756..fac08c0 100644 --- a/git_pull/build.json +++ b/git_pull/build.json @@ -7,6 +7,6 @@ "i386": "homeassistant/i386-base:3.11" }, "args": { - "CLI_VERSION": "4.2.0" + "CLI_VERSION": "4.11.0" } } diff --git a/git_pull/config.json b/git_pull/config.json index a762a6a..69a5b98 100644 --- a/git_pull/config.json +++ b/git_pull/config.json @@ -1,6 +1,6 @@ { "name": "Git pull", - "version": "7.12.1", + "version": "7.12.2", "slug": "git_pull", "description": "Simple git pull to update the local configuration", "url": "https://github.com/home-assistant/hassio-addons/tree/master/git_pull", diff --git a/ssh/CHANGELOG.md b/ssh/CHANGELOG.md index 96579fd..db4ff5f 100644 --- a/ssh/CHANGELOG.md +++ b/ssh/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 9.1.0 + +- Upgrade Home Assistant CLI to 4.11.0 +- Support APKs installation on startup + ## 9.0.2 - Update options schema for passwords diff --git a/ssh/build.json b/ssh/build.json index 02fa726..97db022 100644 --- a/ssh/build.json +++ b/ssh/build.json @@ -7,7 +7,7 @@ "i386": "homeassistant/i386-base:3.13" }, "args": { - "CLI_VERSION": "4.10.1", + "CLI_VERSION": "4.11.0", "LIBWEBSOCKETS_VERSION": "4.1.4", "TTYD_VERSION": "1.6.3" } diff --git a/ssh/config.json b/ssh/config.json index 3e2cb0a..5837753 100644 --- a/ssh/config.json +++ b/ssh/config.json @@ -1,6 +1,6 @@ { "name": "Terminal & SSH", - "version": "9.0.2", + "version": "9.1.0", "slug": "ssh", "description": "Allow logging in remotely to Home Assistant using SSH", "url": "https://github.com/home-assistant/hassio-addons/tree/master/ssh", @@ -22,6 +22,7 @@ "map": ["config:rw", "ssl:rw", "addons:rw", "share:rw", "backup:rw", "media:rw"], "options": { "authorized_keys": [], + "apks": [], "password": "", "server": { "tcp_forwarding": false @@ -32,7 +33,8 @@ "password": "password", "server": { "tcp_forwarding": "bool" - } + }, + "apks": ["str"] }, "image": "homeassistant/{arch}-addon-ssh" } diff --git a/ssh/rootfs/etc/cont-init.d/apks.sh b/ssh/rootfs/etc/cont-init.d/apks.sh new file mode 100644 index 0000000..35b1d44 --- /dev/null +++ b/ssh/rootfs/etc/cont-init.d/apks.sh @@ -0,0 +1,16 @@ +#!/usr/bin/with-contenv bashio +# ============================================================================== +# SSH install additional packages on startup +# ============================================================================== + +if ! bashio::config.has_value "apks"; then + bashio::exit.ok +fi + +apk update \ + || bashio::exit.nok "Failed updating Alpine packages indexes" + +for package in $(bashio::config "apks"); do + apk add "$package" \ + || bashio::exit.nok "Failed installing ${package}" +done