From 86b1b0c70fc2e69530a21e494797118ce37c890b Mon Sep 17 00:00:00 2001 From: Markus Storm Date: Mon, 23 Sep 2024 19:31:11 +0200 Subject: [PATCH] Update connectivity check to use TLS Signed-off-by: Markus Storm --- build-image/first-boot.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-image/first-boot.bash b/build-image/first-boot.bash index 82fc2573f..00f9b24b8 100755 --- a/build-image/first-boot.bash +++ b/build-image/first-boot.bash @@ -158,12 +158,12 @@ if [[ $(date +%y%m%d) -lt 240410 ]]; then fi echo -n "$(timestamp) [openHABian] Ensuring network connectivity... " -if ! running_in_docker && tryUntil "ping -c1 8.8.8.8 &> /dev/null || curl --silent --head http://www.openhab.org/docs |& grep -qs 'HTTP/1.1 200 OK'" 5 1; then +if ! running_in_docker && tryUntil "ping -c1 8.8.8.8 &> /dev/null || curl --silent --head https://www.openhab.org/docs/ |& grep -qs 'HTTP/[^ ]*[ ]200'" 5 1; then echo "FAILED" if [[ "$hotSpot" == "enable" ]] && ! [[ -x $(command -v comitup) ]]; then setup_hotspot install - tryUntil "ping -c1 8.8.8.8 &> /dev/null || curl --silent --head http://www.openhab.org/docs |& grep -qs 'HTTP/1.1 200 OK'" 3 1 + tryUntil "ping -c1 8.8.8.8 &> /dev/null || curl --silent --head https://www.openhab.org/docs/ |& grep -qs 'HTTP/[^ ]*[ ]200'" 3 1 systemctl restart comitup echo "OK" fi @@ -174,7 +174,7 @@ if ! running_in_docker && tryUntil "ping -c1 8.8.8.8 &> /dev/null || curl --sile echo " After about an hour, we will continue trying to get your system installed," echo " but without proper Internet connectivity this is not likely to be going to work." - tryUntil "ping -c1 8.8.8.8 &> /dev/null || curl --silent --head http://www.openhab.org/docs |& grep -qs 'HTTP/1.1 200 OK'" 100 30 + tryUntil "ping -c1 8.8.8.8 &> /dev/null || curl --silent --head https://www.openhab.org/docs/ |& grep -qs 'HTTP/[^ ]*[ ]200'" 100 30 else echo "OK" fi