Chat - Added logic to detect if the callsign has changed since the configuration for chattervox was first generated

This commit is contained in:
Gaston Gonzalez
2024-12-06 06:46:30 -07:00
parent b91d96ce85
commit 802616de50
@@ -109,6 +109,17 @@ cat <<EOF > "${CHATTERVOX_CONF_FILE}"
} }
EOF EOF
fi 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 fi
} }