periodicstats: Align with bbfdm micro_service

This commit is contained in:
Vivek Kumar Dutta 2024-03-10 12:44:16 +05:30
parent 43b5e66431
commit 39f1bbe436
3 changed files with 9 additions and 6 deletions

View file

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

View file

@ -3,11 +3,8 @@
START=61
STOP=01
. /etc/bbfdm/bbfdm_services.sh
USE_PROCD=1
PROG="/usr/sbin/periodicstatsd"
PERIODICSTATS_JSON_INPUT="/etc/periodicstats/input.json"
start_service() {
local enable
@ -15,8 +12,6 @@ start_service() {
config_load periodicstats
config_get_bool enable globals enable 1
bbfdm_add_service "bbfdm.periodicstats" "${PERIODICSTATS_JSON_INPUT}"
if [ "${enable}" -ne "1" ]; then
return 0;
fi

View file

@ -0,0 +1,8 @@
#!/bin/sh
if ! uci -q get bbfdm.periodicstats >/dev/null; then
uci set bbfdm.periodicstats=micro_service
uci set bbfdm.periodicstats.enable=1
uci set bbfdm.periodicstats.input_json="/etc/periodicstats/input.json"
uci set bbfdm.periodicstats.loglevel=1
fi