openwrt-packages/utils/pservice
Huangbin Zhan 0ec746ccb6 treewide: add conffiles
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2020-05-09 06:06:43 +08:00
..
files pservice: shorten code 2019-08-12 08:23:03 +00:00
Makefile treewide: add conffiles 2020-05-09 06:06:43 +08:00
README.md pservice: initial version 2019-08-06 10:09:58 +08:00

README.md

uci

disabled, bool, default 0

name, string, name of the service instance

command, file, the service instance executable

args, list of args

stderr, bool, default 0, log stderr output of the service instance

stdout, bool, default 0, log stdout output of the service instance

env, list of environment variable settings of the form var=val

file, list of file names. Service instances will be restarted if content of these files have changed on service reload event.

respawn_threshold, uinteger, default 3600, time in seconds the instances have to be in running state to be considered a valid run

respawn_timeout, uinteger, default 5, time in seconds the instance should be delayed to start again after the last crash

respawn_maxfail, uinteger, default 5, maximum times the instances can crash/fail in a row and procd will not try to bring it up again after this limit has been reached

notes and faq

Initial environment variables presented to service instances may be different from what was observed on the interactive terminal. E.g. HOME=/ may affect reading ~/.ssh/known_hosts of dropbear ssh instance.

PATH=/usr/sbin:/usr/bin:/sbin:/bin PWD=/ HOME=/

If list args xxx seems to be too long causing pain, consider using /bin/sh as the command. It is also worth noting that uci supports multi-line option value.

Child processes will keep running when their parent process was killed. This is especially the case and should be taken into account with option command being /bin/sh and it is recommended to use exec as the last shell command.