From 1638fd89e5825750b02d7e2afdfbb673c94e00f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 27 Apr 2022 18:27:48 -0400 Subject: [PATCH] Update esphome-install.sh --- setup/esphome-install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 0e3e211b..9e809e1e 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -54,11 +54,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" -wget -q --tries=10 --timeout=5 --spider https://google.com -if [[ $? -eq 0 ]]; then +msg_info "Checking Internet Status" +INTER=$(wget -q --tries=10 --timeout=5 --spider https://google.com) +sleep 2 +if [[ $INTER -eq 0 ]]; then msg_ok "Internet Online" else - echo -e "{CROSS}${RD} Internet Offline" + echo -e "${CROSS}${RD} Internet Offline" fi msg_info "Updating Container OS"