ubusd: add an init script

SVN-Revision: 28496
This commit is contained in:
Felix Fietkau 2011-10-20 15:01:12 +00:00
parent c2b5767572
commit 0798d4a5c7
2 changed files with 13 additions and 1 deletions

View file

@ -46,7 +46,8 @@ define Package/ubus/install
endef
define Package/ubusd/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d
$(INSTALL_BIN) ./files/ubus.init $(1)/etc/init.d/ubus
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/ubusd $(1)/sbin/
endef

11
package/ubus/files/ubus.init Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh /etc/rc.common
START=11
PIDFILE=/var/run/ubusd.pid
start() {
start-stop-daemon -S -b -m -p $PIDFILE -x /sbin/ubusd
}
stop() {
start-stop-daemon -K -x /sbin/ubusd -p $PIDFILE
}