xmppc: Added LastChangeDate and TLSEstablished DM

This commit is contained in:
Suvendhu Hansa 2024-07-17 13:17:30 +05:30 committed by Vivek Kumar Dutta
parent 2053e3281f
commit a03c7f0681
2 changed files with 15 additions and 2 deletions

View file

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=xmppc
PKG_VERSION:=2.2.9
PKG_VERSION:=2.2.10
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/xmppc.git
PKG_SOURCE_VERSION:=ff76b296e767a5732d7b07ad94c141a4a6e50ed5
PKG_SOURCE_VERSION:=a2945d99b916ddbe3b5270446e9b8d310a104052
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View file

@ -11,12 +11,25 @@ stop_service() {
if [ "${xmpp_running}" = "true" ]; then
procd_send_signal xmppc '*' SIGKILL
fi
if [ -f "/var/state/xmppc" ]; then
uci -q -c /var/state delete xmppc.conn_status
uci -q -c /var/state commit xmppc
fi
}
start_service() {
local con_name=$(uci -q get xmpp.xmpp.conn_req_connection)
local con_enable=$(uci -q get xmpp."${con_name}".enable)
if [ ! -f "/var/state/xmppc" ]; then
touch "/var/state/xmppc"
fi
uci -q -c /var/state set xmppc.global='global'
uci -q -c /var/state set xmppc.global.last_change="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
uci -q -c /var/state commit xmppc
procd_open_instance
if [ "$con_enable" = "1" ]; then
procd_set_param command "$PROG"