From f70e4946d7234f147202e3e61a0a036c9b048d32 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 2 Jun 2022 16:28:25 +0200 Subject: [PATCH] added current_settings_to_ismas() --- news_to_ismas | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/news_to_ismas b/news_to_ismas index 1789b49..77da69e 100755 --- a/news_to_ismas +++ b/news_to_ismas @@ -60,6 +60,40 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once log_debug "$func:${LINENO}: data=$data" echo $((echo "$data"; sleep 1) | nc localhost $APISM_DB_PORT) } + + current_settings_to_ismas () { + local func="${FUNCNAME[0]}" + local p=("$@") + local data="#M=APISM#C=CMD_SENDVERSION#J= + { + \"TARIFF\": { + \"VERSION\" : \"\", + \"PROJECT\" : \"\", + \"ZONE\" : 0, + \"INFO\" : \"\" + }, + \"HARDWARE\" : { + \"DEVICES\" : [ + \"PTU5\", \"DC\", \"PRINTER\", \"BNA\" + ] + }, + \"OS\" : { + \"$(uname)\": \"$(uname -a)\" + }, + \"CONFIG\" : { + \"PTU5\" : { + }, + \"DC\" : { + }, + \"PRINTER\" : { + }, + \"BNA\" : { + } + } + }" + log_debug "$func:${LINENO}: data=$data" + echo $((echo "$data"; sleep 1) | nc localhost $APISM_DB_PORT) + } ########################################################################### ###########################################################################