mirror of
https://github.com/troglobit/finit.git
synced 2026-11-29 21:08:21 +00:00
doc: document supported types of forking/non-forking daemon's
Issue #223 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
27ba3b27f5
commit
c148d8d783
1 file changed
+44
@@ -1,6 +1,50 @@
|
|||||||
Finit Services
|
Finit Services
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
Starting & Monitoring
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Finit can start and monitor the following types of daemons:
|
||||||
|
|
||||||
|
* Forks to background, creates a PID file
|
||||||
|
* Runs in foreground:
|
||||||
|
- creates a PID file
|
||||||
|
- does not create a PID file -- Finit can create it for you (optional)
|
||||||
|
|
||||||
|
Finit can *not* start and monitor a daemon that:
|
||||||
|
|
||||||
|
* Forks to background and does *not* create a PID file
|
||||||
|
|
||||||
|
| | Forking | Creates PID File | Finit can create PID File |
|
||||||
|
|---|---------|------------------|---------------------------|
|
||||||
|
| ✔ | Yes | Yes | N/A |
|
||||||
|
| ✔ | No | Yes | N/A |
|
||||||
|
| ✔ | No | No | Yes |
|
||||||
|
| ✘ | Yes | No | No |
|
||||||
|
|
||||||
|
> **Note:** PID files is one mechanism used to assert conditions to
|
||||||
|
> synchronize the start and stop of other, dependent, services.
|
||||||
|
|
||||||
|
### Forks to Background w/ PID File
|
||||||
|
|
||||||
|
service pid:!/run/serv.pid serv -- Forking service
|
||||||
|
|
||||||
|
### Runs in Foreground w/ PID File
|
||||||
|
|
||||||
|
service serv -n -p -- Foreground service w/ PID file
|
||||||
|
|
||||||
|
### Runs in Foreground w/o PID File
|
||||||
|
|
||||||
|
Same as previous, but we tell Finit to create the PID file, because we
|
||||||
|
need it to synchronize start/stop of a dependent service.
|
||||||
|
|
||||||
|
service pid:/run/serv.pid serv -n -- Foreground service w/o PID file
|
||||||
|
|
||||||
|
### Runs in Foreground w/ Custom PID File
|
||||||
|
|
||||||
|
service pid:/run/servy.pid serv -n -p -P /run/servy.pid -- Foreground service w/ custom PID file
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
State Machine
|
State Machine
|
||||||
|
|||||||
Reference in new issue
Block a user