@@ -1052,15 +1052,17 @@ _fr24_acquire_binary() {
10521052 rm -rf " $tmp "
10531053}
10541054
1055- # _fr24_write_ini <ini> <key>: configure fr24feed as a BEAST-TCP consumer of
1056- # the local decoder with the operator's sharing key (MLAT off, per the
1057- # adapter's FR24-MLAT-default-off contract).
1055+ # _fr24_write_ini <ini> <key> <decoder-addr>: configure fr24feed as a BEAST-TCP
1056+ # consumer of the local decoder at <decoder-addr> with the operator's sharing
1057+ # key (MLAT off, per the adapter's FR24-MLAT-default-off contract). The address
1058+ # is the same AGG_DECODER_ADDR the reachability probe checks, so fr24feed feeds
1059+ # from exactly what was verified rather than a separately hardcoded endpoint.
10581060_fr24_write_ini () {
1059- local ini=" $1 " key=" $2 " tmp
1061+ local ini=" $1 " key=" $2 " addr= " $3 " tmp
10601062 tmp=" $( mktemp " ${ini} .XXXXXX" ) " || return 1
10611063 if ! cat > " $tmp " << EOF
10621064receiver="beast-tcp"
1063- host="127.0.0.1:30005 "
1065+ host="$addr "
10641066fr24key="$key "
10651067bs="no"
10661068raw="no"
@@ -1175,7 +1177,7 @@ _enable_fr24() {
11751177 _worker_progress configuring
11761178 install -d -m 0750 " $( dirname " $ini " ) " 2> /dev/null || true
11771179 if [[ -n " $key " ]]; then
1178- _fr24_write_ini " $ini " " $key " || { _emit_error state_error " failed to write fr24feed.ini" ; exit 3; }
1180+ _fr24_write_ini " $ini " " $key " " $AGG_DECODER_ADDR " || { _emit_error state_error " failed to write fr24feed.ini" ; exit 3; }
11791181 else
11801182 if ! _fr24_signup " $bin " " $ini " " $email " " $lat " " $lon " " $alt " ; then
11811183 _emit_error signup_failed " fr24 signup did not return a sharing key" ; exit 2
@@ -1185,7 +1187,7 @@ _enable_fr24() {
11851187 # The wizard writes its own receiver config (dvbt/auto); overwrite it so the
11861188 # signup and keyed paths produce identical BEAST-TCP-to-local config. Only
11871189 # the minted key is kept from the wizard's run.
1188- _fr24_write_ini " $ini " " $key " || { _emit_error state_error " failed to write fr24feed.ini" ; exit 3; }
1190+ _fr24_write_ini " $ini " " $key " " $AGG_DECODER_ADDR " || { _emit_error state_error " failed to write fr24feed.ini" ; exit 3; }
11891191 fi
11901192 _fr24_finalize_perms " $ini "
11911193
0 commit comments