wifimngr: start/stop through init.d script

This commit is contained in:
Anjan Chanda 2018-10-02 10:32:49 +02:00
parent 83fc458691
commit 4d707bec3b
2 changed files with 22 additions and 0 deletions

View file

@ -46,6 +46,8 @@ TARGET_CFLAGS += \
#endef
define Package/wifimngr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/wifimngr.init $(1)/etc/init.d/wifimngr
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wifimngr $(1)/usr/sbin/
endef

View file

@ -0,0 +1,20 @@
#!/bin/sh /etc/rc.common
START=95
STOP=10
USE_PROCD=1
PROG=/usr/sbin/wifimngr
start_service() {
procd_open_instance
procd_set_param command ${PROG}
# procd_set_param env IOP_LLA_LIBS_DEBUG=3 #for debugging only
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}