mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-28 11:36:32 +00:00
bugfix v4
This commit is contained in:
parent
b8f2758379
commit
516f803a02
@ -79,10 +79,10 @@ if tag=$(curl --silent $ENDPOINT | jq -e -r '.supervisor_tag'); then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z $UPDATER_SUPERVISOR_TAG ]; then
|
||||
if [ ! -z $UPDATER_SUPERVISOR_TAG ]; then
|
||||
tag=$UPDATER_SUPERVISOR_TAG
|
||||
fi
|
||||
if [ -z $UPDATER_SUPERVISOR_IMAGE ]; then
|
||||
if [ ! -z $UPDATER_SUPERVISOR_IMAGE ]; then
|
||||
image_name=$UPDATER_SUPERVISOR_IMAGE
|
||||
fi
|
||||
|
||||
@ -115,6 +115,10 @@ systemctl start resin-supervisor
|
||||
|
||||
# Mark supervisor as working. This version will run when the device reboots.
|
||||
echo "Mark pulled tag as latest..."
|
||||
docker tag -f "$image_name:$tag" "$image_name:latest"
|
||||
docker tag "$image_name:$tag" "$image_name:latest"
|
||||
sed --in-place "s|SUPERVISOR_IMAGE=.*|SUPERVISOR_IMAGE=$image_name|" /etc/resin-supervisor/supervisor.conf
|
||||
sed --in-place "s|SUPERVISOR_TAG=.*|SUPERVISOR_TAG=$tag|" /etc/resin-supervisor/supervisor.conf
|
||||
|
||||
# cleanup old image
|
||||
echo "Cleanup old supervisor"
|
||||
docker rmi $SUPERVISOR_IMAGE:$SUPERVISOR_TAG || true
|
||||
|
@ -1 +1 @@
|
||||
HASSIO_VERSION=%HASSIO_VERSION%
|
||||
HASSIO_VERSION=@HASSIO_VERSION@
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
# Default values
|
||||
TAG=1.0
|
||||
LOGFILE=/tmp/`basename "$0"`.log
|
||||
LOG=yes
|
||||
ONLY_SUPERVISOR=no
|
||||
@ -197,18 +196,18 @@ done
|
||||
|
||||
# Check that HostOS version was provided
|
||||
if [ -z "$HOSTOS_VERSION" ]; then
|
||||
if version=$(curl $ENDPOINT | jq -e -r '.hassio_version')
|
||||
HOSTOS_VERSION=version
|
||||
if version=$(curl --silent $ENDPOINT | jq -e -r '.hassio_version'); then
|
||||
HOSTOS_VERSION=$version
|
||||
else
|
||||
log ERROR "--hostos-version is required."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z $RESINHUP_VERSION ]; then
|
||||
if version=$(curl $ENDPOINT | jq -e -r '.resinhub_version')
|
||||
HOSTOS_VERSION=version
|
||||
if version=$(curl --silent $ENDPOINT | jq -e -r '.resinhup_version'); then
|
||||
RESINHUP_VERSION=$version
|
||||
else
|
||||
log ERROR "--hostos-version is required."
|
||||
log ERROR "--resinhup-version is required."
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -220,6 +219,8 @@ if [ "$LOG" == "yes" ]; then
|
||||
fi
|
||||
|
||||
# Check if update is needed
|
||||
log "Detected HassIO version: $HASSIO_VERSION ."
|
||||
log "Update HassIO to version: $HOSTOS_VERSION ."
|
||||
if [ $HASSIO_VERSION == $HOSTOS_VERSION ]; then
|
||||
log "Version $HOSTOS_VERSION is already installed."
|
||||
exit 0
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"supervisor_tag": "20170319",
|
||||
"supervisor_tag": "20170322",
|
||||
"homeassistant_tag": "0.40.1",
|
||||
"hassio_version": "0.1",
|
||||
"resinhup_version": "1.1.1",
|
||||
"resinhup_version": "1.1.1"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user