Merge pull request #422 from icenine451/cooker-0.7.0b-icenine451

Cooker 0.7.0b icenine451
This commit is contained in:
icenine451 2023-06-14 06:44:44 -04:00 committed by GitHub
commit 46c69a405b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {