mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
bulkdata: 2.1.1
This commit is contained in:
parent
8aeadf5fdc
commit
f0d7922c40
3 changed files with 46 additions and 7 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=bulkdata
|
PKG_NAME:=bulkdata
|
||||||
PKG_VERSION:=2.1.0
|
PKG_VERSION:=2.1.1
|
||||||
|
|
||||||
LOCAL_DEV:=0
|
LOCAL_DEV:=0
|
||||||
ifneq ($(LOCAL_DEV),1)
|
ifneq ($(LOCAL_DEV),1)
|
||||||
|
|
@ -44,8 +44,9 @@ endif
|
||||||
define Package/$(PKG_NAME)/install
|
define Package/$(PKG_NAME)/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
|
||||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
$(INSTALL_DIR) $(1)/etc/bbfdm/services
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.json $(1)/etc/bbfdm/json
|
$(INSTALL_DIR) $(1)/etc/bbfdm/services/bulkdata
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.json $(1)/etc/bbfdm/services/bulkdata
|
||||||
$(CP) ./files/* $(1)/
|
$(CP) ./files/* $(1)/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
||||||
30
bulkdata/files/etc/bbfdm/services/bulkdata/input.json
Executable file
30
bulkdata/files/etc/bbfdm/services/bulkdata/input.json
Executable file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"daemon": {
|
||||||
|
"config": {
|
||||||
|
"refresh_time": 3600,
|
||||||
|
"enable_plugins": 0
|
||||||
|
},
|
||||||
|
"input": {
|
||||||
|
"type": "JSON",
|
||||||
|
"name": "/etc/bbfdm/services/bulkdata/bulkdata.json"
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"type": "UBUS",
|
||||||
|
"name": "bbfdm.bulkdata"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"config": {
|
||||||
|
"proto": "both",
|
||||||
|
"instance_mode": 0,
|
||||||
|
"enable_plugins": 0
|
||||||
|
},
|
||||||
|
"input": {
|
||||||
|
"type": "UBUS",
|
||||||
|
"name": "bbfdm.bulkdata"
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"type": "CLI"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,8 @@ STOP=10
|
||||||
|
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
PROG="/usr/sbin/bulkdatad"
|
PROG="/usr/sbin/bulkdatad"
|
||||||
|
BBFDMD_PROG="/usr/sbin/bbfdmd"
|
||||||
|
BULKDATA_JSON_INPUT="/etc/bbfdm/services/bulkdata/input.json"
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
local enable
|
local enable
|
||||||
|
|
@ -12,12 +14,18 @@ start_service() {
|
||||||
config_load bulkdata
|
config_load bulkdata
|
||||||
config_get_bool enable bulkdata enable 1
|
config_get_bool enable bulkdata enable 1
|
||||||
|
|
||||||
procd_open_instance bulkdata
|
procd_open_instance "bbfdm.bulkdata"
|
||||||
|
procd_set_param command "$BBFDMD_PROG"
|
||||||
|
procd_append_param command -I "${BULKDATA_JSON_INPUT}"
|
||||||
|
procd_set_param respawn
|
||||||
|
procd_close_instance "bbfdm.bulkdata"
|
||||||
|
|
||||||
[ "$enable" -eq "1" ] && {
|
[ "$enable" -eq "1" ] && {
|
||||||
|
procd_open_instance "bulkdata"
|
||||||
procd_set_param command "$PROG"
|
procd_set_param command "$PROG"
|
||||||
procd_set_param respawn "3" "7" "0"
|
procd_set_param respawn
|
||||||
}
|
procd_close_instance "bulkdata"
|
||||||
procd_close_instance
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
reload_service() {
|
reload_service() {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue