Waiting for internet up to continue
This commit is contained in:
parent
5fa7341d9c
commit
75acb70011
1 changed files with 8 additions and 3 deletions
|
@ -34,7 +34,8 @@ FILE_NM_CONF="/etc/NetworkManager/NetworkManager.conf"
|
|||
FILE_NM_CONNECTION="/etc/NetworkManager/system-connections/default"
|
||||
|
||||
URL_RAW_BASE="https://raw.githubusercontent.com/home-assistant/supervised-installer/master/files"
|
||||
URL_VERSION="https://version.home-assistant.io/stable.json"
|
||||
URL_VERSION_HOST="version.home-assistant.io"
|
||||
URL_VERSION="https://${URL_VERSION_HOST}/stable.json"
|
||||
URL_BIN_APPARMOR="${URL_RAW_BASE}/hassio-apparmor"
|
||||
URL_BIN_HASSIO="${URL_RAW_BASE}/hassio-supervisor"
|
||||
URL_DOCKER_DAEMON="${URL_RAW_BASE}/docker_daemon.json"
|
||||
|
@ -200,6 +201,10 @@ if [ ! -d "${PREFIX}/bin" ]; then
|
|||
mkdir -p "${PREFIX}/bin"
|
||||
fi
|
||||
# Read infos from web
|
||||
while ! ping -c 1 -W 1 ${URL_VERSION_HOST}; do
|
||||
info "Waiting for ${URL_VERSION_HOST} - network interface might be down..."
|
||||
sleep 2
|
||||
done
|
||||
HASSIO_VERSION=$(curl -s $URL_VERSION | jq -e -r '.supervisor')
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue