periodicstats: Fix reload handler

This commit is contained in:
Vivek Kumar Dutta 2024-04-15 12:00:33 +05:30
parent 0d4b589f86
commit 7df3657de8
3 changed files with 11 additions and 8 deletions

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=periodicstats
PKG_VERSION:=1.5.5
PKG_VERSION:=1.5.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

View file

@ -1,4 +1,4 @@
config globals 'globals'
option enable '0'
option enable '1'
option base_interval '5'

View file

@ -12,16 +12,19 @@ start_service() {
config_load periodicstats
config_get_bool enable globals enable 1
if [ "${enable}" -ne "1" ]; then
return 0;
fi
procd_open_instance periodicstatsd
procd_set_param command ${PROG}
procd_set_param respawn
if [ "${enable}" -eq "1" ]; then
procd_set_param command ${PROG}
procd_set_param respawn
fi
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger periodicstats
}