From 802616de50f8b0dd2325bd26d8aa5d3bb178d53d Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Fri, 6 Dec 2024 06:46:30 -0700 Subject: [PATCH] Chat - Added logic to detect if the callsign has changed since the configuration for chattervox was first generated --- overlay/opt/emcomm-tools/bin/et-chattervox | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/overlay/opt/emcomm-tools/bin/et-chattervox b/overlay/opt/emcomm-tools/bin/et-chattervox index 762af2c..c8f3175 100755 --- a/overlay/opt/emcomm-tools/bin/et-chattervox +++ b/overlay/opt/emcomm-tools/bin/et-chattervox @@ -109,6 +109,17 @@ cat < "${CHATTERVOX_CONF_FILE}" } EOF fi + + else + et-log "Chattervox configuration already exists, checking for change in et-user..." + + CUR_CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign) + CONFIGURED_CALLSIGN=$(cat ${CHATTERVOX_CONF_FILE} | jq -r .callsign) + + if [ "${CUR_CALLSIGN}" != "${CONFIGURED_CALLSIGN}" ]; then + et-log "User callsign has changed from ${CUR_CALLSIGN} to ${CONFIGURED_CALLSIGN}" + fi + fi }