From d18040ec8f6df1ef41fc43f8a3004eb29ac4003d Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 16 Nov 2022 17:20:26 +0100 Subject: [PATCH] Shell script to revert to stable version of Supervisor (#265) * Shell script to revert to stable version of Supervisor * Make more readable * Detect architecture by checking observer * Rename text file --- update-supervisor.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 update-supervisor.txt diff --git a/update-supervisor.txt b/update-supervisor.txt new file mode 100644 index 00000000..c164a789 --- /dev/null +++ b/update-supervisor.txt @@ -0,0 +1,10 @@ +#!/bin/sh + +version=$(curl -s https://version.home-assistant.io/stable.json | jq -r '.supervisor // "latest"' || echo "latest") +arch=$(docker image ls | grep -- '-hassio-observer' | awk '{print $1}' | awk -F/ '{print $3}' | awk -F- '{print $1}') + +docker pull "ghcr.io/home-assistant/${arch}-hassio-supervisor:${version}" +docker tag "ghcr.io/home-assistant/${arch}-hassio-supervisor:${version}" "ghcr.io/home-assistant/${arch}-hassio-supervisor:latest" + +# hassos-supervisor script will recreate the container automatically. +docker stop hassio_supervisor