summaryrefslogtreecommitdiffstats
path: root/iss_above.sh
diff options
context:
space:
mode:
Diffstat (limited to 'iss_above.sh')
-rwxr-xr-xiss_above.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/iss_above.sh b/iss_above.sh
index c67d350..1866c14 100755
--- a/iss_above.sh
+++ b/iss_above.sh
@@ -2,14 +2,17 @@
set -eu
API_URL='http://api.open-notify.org/iss-now.json'
+GEOIP_URL="https://ipapi.co/json"
API_data=$(curl -s "$API_URL")
-
latitude="$(echo $API_data|jq -r '. | .iss_position.latitude')"
longitude="$(echo $API_data|jq -r '. | .iss_position.longitude')"
-my_lat="50.0769160"
-my_long="14.4740344"
+my_location=$(curl -s "$GEOIP_URL")
+my_lat=$(echo $my_location | jq -r '. | .latitude')
+my_long=$(echo $my_location | jq -r '. | .longitude')
+# my_lat="50.0769160"
+# my_long="14.4740344"
# . "mirkarte/geo.sh"