Issue #223: add type:forking service option, with updated docs

- Add `type:forking` service option to trigger guessing pidfile to
   watch for, instead of `pid:!foo` option, which is not intuitive.
   This option may likely also survive into the new file format :)
 - Update docs and add examples
 - Update start-stop-serv.sh test case with this new variant

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-04-04 19:13:28 +02:00
parent 462d5b22b4
commit c926160853
7 changed files with 74 additions and 12 deletions
+2 -1
View File
@@ -57,7 +57,8 @@ test_one()
# shellcheck source=/dev/null
. "$TEST_DIR/tenv/lib.sh"
test_one "/run/serv.pid" "service pid:!/run/serv.pid /test_assets/serv -- Forking service"
test_one "/run/serv.pid" "service pid:!/run/serv.pid /test_assets/serv -- Forking service, type 1"
test_one "/run/serv.pid" "service type:forking /test_assets/serv -- Forking service, type 2"
# This one could never be started by and monitored by Finit: it forks to
# background and does not create a PID file. Essentially it's lost to
# Finit, and any other sane process monitor.