diff options
author | Baitinq <30861839+Baitinq@users.noreply.github.com> | 2019-08-31 18:55:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-31 18:55:00 +0200 |
commit | 3ef45aa979beb4bfad32755b05ba1b301ad2ab49 (patch) | |
tree | fd330137072157b2625fe046bfde957015befc34 | |
parent | Formatting (diff) | |
download | geolocate-3ef45aa979beb4bfad32755b05ba1b301ad2ab49.tar.gz geolocate-3ef45aa979beb4bfad32755b05ba1b301ad2ab49.tar.bz2 geolocate-3ef45aa979beb4bfad32755b05ba1b301ad2ab49.zip |
-rwxr-xr-x | geolocate | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/geolocate b/geolocate index 85af634..258f872 100755 --- a/geolocate +++ b/geolocate @@ -34,8 +34,8 @@ getIp() { } getCoord() { -curl -s https://ipvigilante.com/ | \ - jq '.data.latitude, .data.longitude' | \ +curl -s http://ip-api.com/json | \ + jq '.lat, .lon' | \ while read -r LATITUDE; do read -r LONGITUDE echo "${LATITUDE}:${LONGITUDE}" | tr -d '"' @@ -43,8 +43,8 @@ curl -s https://ipvigilante.com/ | \ } printCoord() { -curl -s https://ipvigilante.com/ | \ - jq '.data.latitude, .data.longitude' | \ +curl -s http://ip-api.com/json | \ + jq '.lat, .lon' | \ while read -r LATITUDE; do read -r LONGITUDE echo "${LATITUDE}:${LONGITUDE}" | tr -d '"' > /usr/share/geolocate/.location @@ -70,8 +70,8 @@ curl -s https://ipvigilante.com/ | \ ;; *) IP="$2" - curl -s https://ipvigilante.com/$IP | \ - jq '.data.latitude, .data.longitude' | \ + curl -s http://ip-api.com/json/$IP | \ + jq '.lat, .lon' | \ while read -r LATITUDE; do read -r LONGITUDE echo "${LATITUDE}:${LONGITUDE}" | tr -d '"' |