mirror of
https://github.com/troglobit/finit.git
synced 2026-10-28 12:30:44 +00:00
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:
1 parent
462d5b22b4
commit
c926160853
7 files changed
+74
-12
No files matched your search
@@ -158,6 +158,11 @@ int pid_file_set(svc_t *svc, char *file, int not)
|
||||
file++;
|
||||
}
|
||||
|
||||
if (svc_is_forking(svc) && !not) {
|
||||
logit(LOG_WARNING, "Service %s is forking, adjusting to pid:!%s", svc->name, file);
|
||||
not = 1;
|
||||
}
|
||||
|
||||
pid_runpath(file, &svc->pidfile[not], sizeof(svc->pidfile) - not);
|
||||
if (not)
|
||||
svc->pidfile[0] = '!';
|
||||
|
||||
Reference in new issue
Block a user