mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
bbfdm: 1.0.19
This commit is contained in:
parent
e5704ad7f2
commit
b47ff7b8c8
3 changed files with 24 additions and 36 deletions
|
|
@ -5,11 +5,11 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bbfdm
|
||||
PKG_VERSION:=1.0.18
|
||||
PKG_VERSION:=1.0.19
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
|
||||
PKG_SOURCE_VERSION:=adaa95333651230428928461198594e319a8ff29
|
||||
PKG_SOURCE_VERSION:=6d8b66092adf184f6e4f1f85a91dcc4e1f8f29e5
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
|
|
@ -166,7 +166,6 @@ CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
|
|||
endif
|
||||
|
||||
ifeq ($(CONFIG_PACKAGE_bbfdmd),y)
|
||||
CMAKE_OPTIONS += -DBBFDMD_ENABLED=ON
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBFDMD_MAX_MSG_LEN:Integer=10485760
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@ config bbfdmd 'bbfdmd'
|
|||
option loglevel '1'
|
||||
option refresh_time '10'
|
||||
option transaction_timeout '10'
|
||||
option enable_plugins '1'
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ USE_PROCD=1
|
|||
PROG=/usr/sbin/bbfdmd
|
||||
|
||||
BBFDM_JSON_INPUT="/etc/bbfdm/input.json"
|
||||
TMP_JSON_INPUT="/tmp/bbfdm_input.json"
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t bbfdmd.init -p info
|
||||
|
|
@ -38,6 +37,24 @@ configure_bbfdmd()
|
|||
|
||||
[ "${enabled}" -eq 0 ] && return 0
|
||||
|
||||
[ ! -f "${BBFDM_JSON_INPUT}" ] && return 0
|
||||
|
||||
if [ -n "${loglevel}" ]; then
|
||||
echo "$(jq --arg res ${loglevel} '.daemon.config += {"loglevel": $res}' ${BBFDM_JSON_INPUT})" > ${BBFDM_JSON_INPUT}
|
||||
fi
|
||||
|
||||
if [ -n "${refresh_time}" ]; then
|
||||
echo "$(jq --arg res ${refresh_time} '.daemon.config += {"refresh_time": $res}' ${BBFDM_JSON_INPUT})" > ${BBFDM_JSON_INPUT}
|
||||
fi
|
||||
|
||||
if [ -n "${transaction_timeout}" ]; then
|
||||
echo "$(jq --arg res ${transaction_timeout} '.daemon.config += {"transaction_timeout": $res}' ${BBFDM_JSON_INPUT})" > ${BBFDM_JSON_INPUT}
|
||||
fi
|
||||
|
||||
if [ -n "${subprocess_level}" ]; then
|
||||
echo "$(jq --arg res ${subprocess_level} '.daemon.config += {"subprocess_level": $res}' ${BBFDM_JSON_INPUT})" > ${BBFDM_JSON_INPUT}
|
||||
fi
|
||||
|
||||
procd_set_param command ${PROG}
|
||||
if [ "${debug}" -eq 1 ]; then
|
||||
procd_set_param stdout 1
|
||||
|
|
@ -47,41 +64,14 @@ configure_bbfdmd()
|
|||
if [ -f "${sock}" ]; then
|
||||
procd_append_param command -s "${sock}"
|
||||
fi
|
||||
|
||||
[ ! -f "${BBFDM_JSON_INPUT}" ] && return 0
|
||||
|
||||
cp -f ${BBFDM_JSON_INPUT} ${TMP_JSON_INPUT} 2>/dev/null
|
||||
|
||||
if [ -n "${loglevel}" ]; then
|
||||
echo "$(jq --arg res ${loglevel} '.daemon.config += {"loglevel": $res}' ${TMP_JSON_INPUT})" > ${TMP_JSON_INPUT}
|
||||
fi
|
||||
|
||||
if [ -n "${refresh_time}" ]; then
|
||||
echo "$(jq --arg res ${refresh_time} '.daemon.config += {"refresh_time": $res}' ${TMP_JSON_INPUT})" > ${TMP_JSON_INPUT}
|
||||
fi
|
||||
|
||||
if [ -n "${transaction_timeout}" ]; then
|
||||
echo "$(jq --arg res ${transaction_timeout} '.daemon.config += {"transaction_timeout": $res}' ${TMP_JSON_INPUT})" > ${TMP_JSON_INPUT}
|
||||
fi
|
||||
|
||||
if [ -n "${subprocess_level}" ]; then
|
||||
echo "$(jq --arg res ${subprocess_level} '.daemon.config += {"subprocess_level": $res}' ${TMP_JSON_INPUT})" > ${TMP_JSON_INPUT}
|
||||
fi
|
||||
|
||||
if [ -n "${enable_plugins}" ]; then
|
||||
echo "$(jq --arg res ${enable_plugins} '.daemon.config += {"enable_plugins": $res}' ${TMP_JSON_INPUT})" > ${TMP_JSON_INPUT}
|
||||
fi
|
||||
|
||||
procd_append_param command -I "${TMP_JSON_INPUT}"
|
||||
}
|
||||
|
||||
start_service() {
|
||||
|
||||
procd_open_instance bbf
|
||||
start_service()
|
||||
{
|
||||
procd_open_instance "bbfdm"
|
||||
configure_bbfdmd
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
procd_close_instance "bbfdm"
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue