mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-20 01:20:35 +08:00
Compare commits
1 Commits
add_libblo
...
wfadatad-c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a7b8923ca |
@@ -53,15 +53,17 @@ TARGET_CFLAGS += \
|
||||
MAKE_PATH:=src
|
||||
|
||||
#define Build/Prepare
|
||||
# $(CP) -rf ./wfadatad/src/* $(PKG_BUILD_DIR)/
|
||||
# $(CP) -rf ./wfadatad/* $(PKG_BUILD_DIR)/
|
||||
#endef
|
||||
|
||||
define Package/wfadatad/install
|
||||
|
||||
ifeq ($(CONFIG_WFA_DELM_STANDALONE),y)
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) ./files/wfa_delm.init $(1)/etc/init.d/wfa_delm
|
||||
$(INSTALL_BIN) ./files/etc/init.d/wfa_delm $(1)/etc/init.d/wfa_delm
|
||||
$(INSTALL_BIN) ./files/etc/config/wfa_delm $(1)/etc/config/wfa_delm
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wfa_delm $(1)/usr/sbin/
|
||||
else
|
||||
$(INSTALL_DIR) $(1)/usr/lib/map-plugins
|
||||
|
||||
2
wfadatad/files/etc/config/wfa_delm
Normal file
2
wfadatad/files/etc/config/wfa_delm
Normal file
@@ -0,0 +1,2 @@
|
||||
config wfa_delm
|
||||
option collector 'false'
|
||||
45
wfadatad/files/etc/init.d/wfa_delm
Normal file
45
wfadatad/files/etc/init.d/wfa_delm
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
STOP=11
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/wfa_delm
|
||||
|
||||
validate_wfadata_section() {
|
||||
uci_validate_section wfa_delm wfa_delm "${1}" \
|
||||
'collector:bool:false'
|
||||
}
|
||||
|
||||
configure_wfadata() {
|
||||
local collector
|
||||
|
||||
validate_wfadata_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
if [ ${collector} -eq 1 ]; then
|
||||
procd_append_param command -m
|
||||
fi
|
||||
}
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
config_load wfa_delm
|
||||
config_foreach configure_wfadata wfa_delm
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger wireless
|
||||
procd_add_reload_trigger "config.change" "wfa_delm" /etc/init.d/wfa_delm restart
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
STOP=11
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/wfa_delm
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger wireless
|
||||
}
|
||||
Reference in New Issue
Block a user