From 372600dfb5a1e92fa5e586562fdef39a0b29552f Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Fri, 7 Jun 2024 18:30:25 +0200 Subject: [PATCH] fix mlat-client auto restart when gpsd inactive --- rootfs/etc/s6-overlay/scripts/mlat-client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/etc/s6-overlay/scripts/mlat-client b/rootfs/etc/s6-overlay/scripts/mlat-client index 9ec731f..b13fc82 100755 --- a/rootfs/etc/s6-overlay/scripts/mlat-client +++ b/rootfs/etc/s6-overlay/scripts/mlat-client @@ -364,7 +364,7 @@ do execstring="$(echo ${MLAT_CMD} ${pid_array[$mlat_pid]} | xargs)" # If GPSD is active, then replace the lat/lon/alt params with the ones from GPSD - if [[ -n new_lat ]];then + if (( GPSD == 1 )); then execstring="$(sed "s/^\(.*\s\+--lat\s\+\)[0-9.-]\+\(.*\)$/\1${new_lat}\2/g" <<< "$execstring")" execstring="$(sed "s/^\(.*\s\+--lon\s\+\)[0-9.-]\+\(.*\)$/\1${new_lon}\2/g" <<< "$execstring")" execstring="$(sed "s/^\(.*\s\+--alt\s\+\)[mft0-9.-]\+\(.*\)$/\1${new_alt}m\2/g" <<< "$execstring")"