From cafbf5ab1e2b4f41bd5624a1625bee5f3c5574d6 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 15 Jun 2024 13:41:54 +0200 Subject: [PATCH] Try to fix https://github.com/Nachtzuster/BirdNET-Pi/issues/100 (#103) --- scripts/install_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_config.sh b/scripts/install_config.sh index 5140ac6..28d9968 100755 --- a/scripts/install_config.sh +++ b/scripts/install_config.sh @@ -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