Browse Source

libiio: add iiod init script

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
lilik-openwrt-22.03
Stijn Tintel 7 years ago
parent
commit
ebf5896009
2 changed files with 15 additions and 1 deletions
  1. +3
    -1
      libs/libiio/Makefile
  2. +12
    -0
      libs/libiio/files/iiod.init

+ 3
- 1
libs/libiio/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libiio PKG_NAME:=libiio
PKG_VERSION:=0.10 PKG_VERSION:=0.10
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/analogdevicesinc/libiio/tar.gz/v$(PKG_VERSION)? PKG_SOURCE_URL:=https://codeload.github.com/analogdevicesinc/libiio/tar.gz/v$(PKG_VERSION)?
@ -91,6 +91,8 @@ define Package/libiio/install
endef endef
define Package/iiod/install define Package/iiod/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/iiod.init $(1)/etc/init.d/iiod
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iiod $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iiod $(1)/usr/sbin/
endef endef


+ 12
- 0
libs/libiio/files/iiod.init View File

@ -0,0 +1,12 @@
#!/bin/sh /etc/rc.common
START=90
USE_PROCD=1
PROG=/usr/sbin/iiod
start_service() {
procd_open_instance
procd_set_param command $PROG
procd_set_param respawn
procd_close_instance
}

Loading…
Cancel
Save