From 0798d4a5c7035bb545dd94527d04fa12b901db15 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 20 Oct 2011 15:01:12 +0000 Subject: [PATCH] ubusd: add an init script SVN-Revision: 28496 --- package/ubus/Makefile | 3 ++- package/ubus/files/ubus.init | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 package/ubus/files/ubus.init diff --git a/package/ubus/Makefile b/package/ubus/Makefile index c117453cb5..d80309cdaf 100644 --- a/package/ubus/Makefile +++ b/package/ubus/Makefile @@ -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 diff --git a/package/ubus/files/ubus.init b/package/ubus/files/ubus.init new file mode 100755 index 0000000000..7fcf106b97 --- /dev/null +++ b/package/ubus/files/ubus.init @@ -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 +} -- 2.30.2