diff --git a/functions/checks.sh b/functions/checks.sh index ca2e38ed..ead3f45d 100644 --- a/functions/checks.sh +++ b/functions/checks.sh @@ -4,25 +4,17 @@ 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 - ( - local response= - if [[ ! -z $(wget --spider -t 1 $remote_network_target_1 | grep "HTTP response 200") ]]; then - local network_connnected="true" + local network_connected="true" elif [[ ! -z $(wget --spider -t 1 $remote_network_target_2 | grep "HTTP response 200") ]]; then - local network_connnected="true" + local network_connected="true" elif [[ ! -z $(wget --spider -t 1 $remote_network_target_3 | grep "HTTP response 200") ]]; then - local network_connnected="true" + local network_connected="true" else - local network_connnected="false" + local network_connected="false" fi - ) | - zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ - --title "RetroDECK Network Check" \ - --text="Verifying network connectivity..." - echo "$network_connected" + echo "$network_connected" } check_desktop_mode() {