This commit is contained in:
dcmartin 2020-12-30 11:48:15 -08:00
parent 845b533ed5
commit 9fe9e1a7e5

View file

@ -209,7 +209,16 @@ if [ ! -d "$DATA_SHARE" ]; then
fi
# Read infos from web
i=0; while [ ${i} -le 10 ] && [ -z "${HASSIO_VERSION:-}" ]; do
HASSIO_VERSION=$(curl -sL $URL_VERSION | jq -e -r '.supervisor')
if [ ! -z "${HASSIO_VERSION:-}" ]; then break; fi
info "Waiting on ${URL_VERSION}; sleeping for $((i*2)) seconds""
sleep $((i*2))
i=$((i+1))
done
if [ -z "${HASSIO_VERSION:-}" ]; then
error "Unable to retrieve HASSIO_VERSION from ${URL_VERSION}"
fi
##
# Write configuration