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

Cooker 0.7.0b icenine451
This commit is contained in:
icenine451 2023-06-02 17:16:56 -04:00 committed by GitHub
commit 87fcc23eca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"