From 0e70ea9e9500b43f73e7208f2bc33cd3b1004e9d Mon Sep 17 00:00:00 2001 From: Charles Arnaudo Date: Wed, 5 Jul 2017 10:11:50 -0400 Subject: [PATCH] Removed duplicate checkInternet() func in ytview (#37) --- ytview/ytview | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ytview/ytview b/ytview/ytview index 4e43ace..b34696f 100755 --- a/ytview/ytview +++ b/ytview/ytview @@ -45,20 +45,6 @@ httpGet() esac } - - - -checkInternet() -{ - echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1 # query google with a get request - if [ $? -eq 0 ]; then #check if the output is 0, if so no errors have occured and we have connected to google successfully - return 0 - else - echo "Error: no active internet connection" >&2 #sent to stderr - return 1 - fi -} - update() { # Author: Alexander Epstein https://github.com/alexanderepstein