diff options
-rwxr-xr-x | geolocate | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/geolocate b/geolocate index c96c91b..bf18073 100755 --- a/geolocate +++ b/geolocate @@ -1,5 +1,7 @@ #!/bin/bash +VERSION=1.0 + # Check for an internet connection echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1 @@ -22,6 +24,10 @@ usage() { echo -e " ip 'IP' - get coordinates of a non-personal ip." } +version() { + echo ${VERSION} +} + getIp() { PUBLIC_IP=`curl -s https://ipinfo.io/ip` echo ${PUBLIC_IP} |