bbfdm: removed deprecated bbfdm_services.sh script

bbfdm_services.sh script had dependency on init script of package, which adds
the datamodel microserice.

This functionality now optimized and provided with 'bbfdm.mk' compile time
helper utility's 'BbfdmInstallMicroServiceInputFile' function.
This commit is contained in:
Vivek Kumar Dutta 2024-04-05 15:33:33 +05:30
parent b44e25c8ee
commit 5c935f03fe
2 changed files with 1 additions and 50 deletions

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.7.25
PKG_VERSION:=1.7.26
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
@ -143,7 +143,6 @@ define Package/bbfdmd/install
$(INSTALL_DATA) ./files/etc/bbfdm/input.json $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_BIN) ./files/etc/bbfdm/bbfdm_services.sh $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
endef

View file

@ -1,48 +0,0 @@
#!/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':'bbfdm.services','instances':{'$name':{'command':['$BBFDMD','-m','$path']}}}"
echo "Use of bbfdm_add_service deprecated, please use bbfdm micro_service uci"
}
bbfdm_stop_service()
{
local name
name="${1}"
if [ -z "${name}" ]; then
return 0;
fi
if ubus call service list '{"name":"bbfdm.services"}' |grep -q "bbfdm.$name"; then
ubus call service delete "{'name':'bbfdm.services','instance':'bbfdm.$name'}"
fi
}
usages()
{
echo "Usages $0: <OPTIONS>..."
echo
echo " -h show help"
echo " -k micro-service name to stop"
echo
}
while getopts "s:k:h" opts; do
case "$opts" in
h) usages; exit 0;;
k) bbfdm_stop_service "${OPTARG}";;
esac
done