mirror of
https://github.com/home-assistant/version.git
synced 2025-07-20 16:50:45 +00:00

* Shell script to revert to stable version of Supervisor * Make more readable * Detect architecture by checking observer * Rename text file
11 lines
553 B
Bash
11 lines
553 B
Bash
#!/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
|