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
+24
View File
@@ -0,0 +1,24 @@
config pservice
option disabled 1
option name 'demo0'
option command /bin/sh
option respawn_maxfail 0
list args -c
list args 'env | logger -t $name; exec sleep $time'
list env 'v0=0'
list env 'v1=val with space'
list env 'name=demo0'
list env 'time=1799'
list file /tmp/sleep.conf
config pservice
option disabled 1
option name 8021x
option command /usr/sbin/wpa_supplicant
option stdout 1
list args -i
list args eth0.1
list args -D
list args wired
list args -c
list args /etc/wpa_supplicant-eth0.1.conf