From 8b7a562d8853c6871de2d779450843ea453ec584 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 19 Sep 2021 19:48:15 -0400 Subject: [PATCH] with quote --- groundstation/loc-add-foxtelem.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/loc-add-foxtelem.py b/groundstation/loc-add-foxtelem.py index 1ecc2e13..877c2d66 100644 --- a/groundstation/loc-add-foxtelem.py +++ b/groundstation/loc-add-foxtelem.py @@ -117,9 +117,11 @@ if ((latitude != 0) and (longitude != 0) or grid): #print (longSedStr) system(longSedStr) - print("\nKLAtracker configuration updated with your latitude and longitude") + print("\nKLAtracker configuration updated with your latitude and longitude") - receiver_gpsSedStr = 'sudo sed -i "s/receiver_gps =.*/receiver_gps = {"lat": ' + str(longitude) + ', "lon": ' + str(longitude) + '}/g" /etc/openwebrx/config_webrx.py' + dquote = '"' + + receiver_gpsSedStr = 'sudo sed -i "s/receiver_gps =.*/receiver_gps = {' + dquote + 'lat' + dquote + ': ' + str(longitude) + ', ' + dquote + 'lon' + dquote + ': ' + str(longitude) + '}/g" /etc/openwebrx/config_webrx.py' #print (longSedStr) system(receiver_gpsSedStr)