From 46164b8dcddebd3dd9d8058ea271034057d34b8f Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 2 Jun 2023 17:15:40 -0400 Subject: [PATCH] Update networking check to fix flatpak weirdness --- functions/checks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/checks.sh b/functions/checks.sh index 88bacc79..3439e3a5 100644 --- a/functions/checks.sh +++ b/functions/checks.sh @@ -4,9 +4,9 @@ check_network_connectivity() { # This function will do a basic check for network availability and return "true" if it is working. # USAGE: if [[ $(check_network_connectivity) == "true" ]]; then - wget -q --spider "$remote_network_target" + local response=$(wget --spider -t 1 $remote_network_target) - if [ $? -eq 0 ]; then + if [[ ! -z $(echo "$response" | grep "HTTP response 200") ]]; then echo "true" else echo "false"