Skip to content

Commit

Permalink
Shell script to revert to stable version of Supervisor (#265)
Browse files Browse the repository at this point in the history
* Shell script to revert to stable version of Supervisor

* Make more readable

* Detect architecture by checking observer

* Rename text file
  • Loading branch information
agners authored Nov 16, 2022
1 parent 18ae682 commit d18040e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions update-supervisor.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d18040e

Please sign in to comment.