This commit is contained in:
Alexandre
2024-06-15 13:41:54 +02:00
committed by GitHub
parent 2c4fe69505
commit cafbf5ab1e
+1 -1
View File
@@ -9,7 +9,7 @@ birdnet_conf=$my_dir/birdnet.conf
# Retrieve latitude and longitude from web
json=$(curl -s4 http://ip-api.com/json)
if [ "$(echo "$json" | jq -r .status)" = "success" ]; then
if [ -n "$json" ] && [ "$(echo "$json" | jq -r .status)" = "success" ]; then
LATITUDE=$(echo "$json" | jq .lat)
LONGITUDE=$(echo "$json" | jq .lon)
else