diff --git a/rootfs/etc/s6-overlay/scripts/01-piaware b/rootfs/etc/s6-overlay/scripts/01-piaware index f96995f..ddcad2e 100755 --- a/rootfs/etc/s6-overlay/scripts/01-piaware +++ b/rootfs/etc/s6-overlay/scripts/01-piaware @@ -5,6 +5,11 @@ rm /etc/piaware.conf > /dev/null 2>&1 || true touch /etc/piaware.conf +# piaware-config is very slow, as we have full control over the config file, just use a function to directly write the config settings into the config file +function piaware-config() { + echo "$1 \"$2\"" | tee -a /etc/piaware.conf +} + # Check to make sure the correct command line arguments have been set EXITCODE=0 if [[ -n "${USERNAME}" ]]; then @@ -76,7 +81,7 @@ fi # If MLAT_RESULTS_BEAST_CONNECT is specified if [[ -n "$MLAT_RESULTS_BEASTHOST" ]]; then - piaware-config mlat-results-format "$(piaware-config -show mlat-results-format) beast,connect,${MLAT_RESULTS_BEASTHOST}:${MLAT_RESULTS_BEASTPORT:-30104}" + piaware-config mlat-results-format "beast,connect,localhost:30104 beast,listen,30105 ext_basestation,listen,30106 beast,connect,${MLAT_RESULTS_BEASTHOST}:${MLAT_RESULTS_BEASTPORT:-30104}" fi # Create log dir for piaware