Fix typo & remove progress dlg from network check

This commit is contained in:
icenine451 2023-06-14 06:38:57 -04:00
parent 68e9e77380
commit c55e9e5c63

View file

@ -4,23 +4,15 @@ check_network_connectivity() {
# This function will do a basic check for network availability and return "true" if it is working. # This function will do a basic check for network availability and return "true" if it is working.
# USAGE: if [[ $(check_network_connectivity) == "true" ]]; then # USAGE: if [[ $(check_network_connectivity) == "true" ]]; then
(
local response=
if [[ ! -z $(wget --spider -t 1 $remote_network_target_1 | grep "HTTP response 200") ]]; then 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 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 elif [[ ! -z $(wget --spider -t 1 $remote_network_target_3 | grep "HTTP response 200") ]]; then
local network_connnected="true" local network_connected="true"
else else
local network_connnected="false" local network_connected="false"
fi 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"
} }