mirror of
https://github.com/alexanderepstein/Bash-Snippets
synced 2018-11-08 02:59:35 +01:00
Using github for check internet
This commit is contained in:
parent
2f007ecb1d
commit
a5fdff610c
@ -40,7 +40,7 @@ httpGet()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
update()
|
||||
|
@ -37,7 +37,7 @@ httpGet()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
update()
|
||||
|
@ -158,7 +158,7 @@ checkAmount()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
## Grabs the exchange rate and does the math for converting the currency
|
||||
|
@ -130,7 +130,7 @@ checkAmount()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
## Grabs the exchange rate and does the math for converting the currency
|
||||
|
@ -40,7 +40,7 @@ httpGet()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
update()
|
||||
|
2
geo/geo
2
geo/geo
@ -173,7 +173,7 @@ update() {
|
||||
}
|
||||
|
||||
checkInternet() {
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
# Option parsing "controller"
|
||||
|
@ -58,7 +58,7 @@ fi
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
## This function grabs information about a movie and using python parses the
|
||||
|
@ -37,7 +37,7 @@ httpGet()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,7 +91,7 @@ makeMultiLineQr()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
usage()
|
||||
|
@ -59,7 +59,7 @@ fi
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
update()
|
||||
|
@ -99,7 +99,7 @@ EOF
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
checkCiphers()
|
||||
|
@ -57,7 +57,7 @@ fi
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
## This function grabs information about a stock and using python parses the
|
||||
|
@ -61,7 +61,7 @@ fi
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
update()
|
||||
|
@ -83,7 +83,7 @@ addTask()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
removeTask()
|
||||
|
@ -56,7 +56,7 @@ getLocationWeather()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
update()
|
||||
|
@ -39,7 +39,7 @@ httpGet()
|
||||
|
||||
checkInternet()
|
||||
{
|
||||
httpGet google.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
httpGet github.com > /dev/null 2>&1 || { echo "Error: no active internet connection" >&2; return 1; } # query google with a get request
|
||||
}
|
||||
|
||||
update()
|
||||
|
Loading…
Reference in New Issue
Block a user