mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
bbfdm: Add support for service registration
This commit is contained in:
parent
7baea620ec
commit
0689c0f91a
2 changed files with 20 additions and 2 deletions
|
|
@ -5,11 +5,11 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=bbfdm
|
PKG_NAME:=bbfdm
|
||||||
PKG_VERSION:=1.2.0
|
PKG_VERSION:=1.2.1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
|
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
|
||||||
PKG_SOURCE_VERSION:=ca483513fd353676bc050655365b93ef642e6397
|
PKG_SOURCE_VERSION:=42a09684f9a17733f8e62e7e9b7021b50af32c43
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
PKG_MIRROR_HASH:=skip
|
PKG_MIRROR_HASH:=skip
|
||||||
|
|
||||||
|
|
@ -213,6 +213,7 @@ define Package/bbfdmd/install
|
||||||
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
|
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/src/bbfdmd $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/src/bbfdmd $(1)/usr/sbin/
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/json/input.json $(1)/etc/bbfdm/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/json/input.json $(1)/etc/bbfdm/
|
||||||
|
$(INSTALL_BIN) ./files/etc/bbfdm/bbfdm_services.sh $(1)/etc/bbfdm/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/userinterface/install
|
define Package/userinterface/install
|
||||||
|
|
|
||||||
17
bbfdm/files/etc/bbfdm/bbfdm_services.sh
Executable file
17
bbfdm/files/etc/bbfdm/bbfdm_services.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
BBFDMD="/usr/sbin/bbfdmd"
|
||||||
|
|
||||||
|
bbfdm_add_service()
|
||||||
|
{
|
||||||
|
local name path
|
||||||
|
|
||||||
|
name="${1}"
|
||||||
|
path="${2}"
|
||||||
|
|
||||||
|
if [ -z "${name}" -o -z "$path" ]; then
|
||||||
|
return 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
ubus call service add "{'name':'$name','instances':{'inst1':{'command':['$BBFDMD','-m','$path']}}}"
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue