icwmpd: Avoid process restart on ACS url change

This commit is contained in:
suvendhu 2023-12-26 12:07:22 +05:30 committed by Vivek Kumar Dutta
parent 4c93c01d22
commit 94895ef110
2 changed files with 16 additions and 2 deletions

View file

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.5.31
PKG_VERSION:=9.5.32
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=ffa47ddf7387f50f0ff87e806d10f56a459f6f50
PKG_SOURCE_VERSION:=07e083d07510d3e321a5ef093f9122e67f4f38e3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View file

@ -575,6 +575,20 @@ reload_service() {
log "Reloading cwmp service ..."
stop
start
return 0
fi
tr069_status="$(ubus -t 1 call tr069 status)"
ret="$?"
if [ "$ret" = "7" ]; then
# ubus timed out may be due to uloop is busy in some task so return
log "Skipping ubus reload due to ubus timeout"
return 0
fi
status="$(echo "${tr069_status}" | jsonfilter -qe '@.cwmp.status')"
if [ "$status" = "up" ]; then
ubus -t 1 call tr069 command '{"command":"reload"}'
fi
}