pservice: initial version

The can be convenient for running commands or services as procd services
without needing to separately write initscripts, just uci configuration.

The package was imported from [1].

 [1] https://github.com/yousong/waller/tree/0a85f5c75fb70627f68cbbcab4807e02e3299e2e/pservice

Ref: https://github.com/yousong/waller/issues/1
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
Yousong Zhou
2019-08-04 15:36:08 +00:00
parent 1a782269f3
commit d58a81f35c
4 changed files with 181 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
# Copyright (C) 2017 Yousong Zhou
include $(TOPDIR)/rules.mk
PKG_NAME:=pservice
PKG_VERSION:=2017-08-29
PKG_RELEASE=1
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
include $(INCLUDE_DIR)/package.mk
define Package/pservice
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Wrap commands as procd services
endef
define Build/Compile
endef
define Package/pservice/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config
$(INSTALL_BIN) ./files/pservice.init $(1)/etc/init.d/pservice
$(INSTALL_DATA) ./files/pservice.config $(1)/etc/config/pservice
endef
$(eval $(call BuildPackage,pservice))