obuspa: Reload when schema update available

This commit is contained in:
vdutta 2021-01-27 19:37:40 +05:30
parent dc5001c949
commit 748e2500f6
2 changed files with 23 additions and 1 deletions

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=3.0.0.10
PKG_VERSION:=3.0.0.11
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

View file

@ -530,6 +530,28 @@ service_triggers() {
procd_add_reload_trigger "uspd"
procd_add_config_trigger "config.change" "${CONFIGURATION}" /etc/init.d/obuspa remove_db
# Create a reload trigger if schema update avaialble
procd_open_trigger
json_add_array
json_add_string "" "usp.raw"
json_add_array
json_add_string "" "if"
json_add_array
json_add_string "" "eq"
json_add_string "" "action"
json_add_string "" "schema_update_available"
json_close_array
json_add_array
json_add_string "" "run_script"
json_add_string "" "/etc/init.d/obuspa"
json_add_string "" "reload"
json_close_array
json_close_array
json_add_int "" "1000"
json_close_array
procd_close_trigger
# local interface
# config_load obuspa
# config_get interface global interface