diff --git a/rootfs/etc/s6-overlay/scripts/dump1090 b/rootfs/etc/s6-overlay/scripts/dump1090 index 0782b69..3a557ec 100755 --- a/rootfs/etc/s6-overlay/scripts/dump1090 +++ b/rootfs/etc/s6-overlay/scripts/dump1090 @@ -31,9 +31,11 @@ DUMP1090_CMD+=("--write-json" "/run/dump1090-fa") DUMP1090_CMD+=("--net-bind-address" "0.0.0.0") # use location from /var/cache/piaware/location.env -source /var/cache/piaware/location.env -DUMP1090_CMD+=("--lat" "$PIAWARE_LAT") -DUMP1090_CMD+=("--lon" "$PIAWARE_LON") +source /var/cache/piaware/location.env || true +if [[ -n "$PIAWARE_LAT" ]] && [[ -n "$PIAWARE_LON" ]]; then + DUMP1090_CMD+=("--lat" "$PIAWARE_LAT") + DUMP1090_CMD+=("--lon" "$PIAWARE_LON") +fi # Handle "--modeac" if [[ "$ALLOW_MODEAC" == "yes" ]]; then