mirror of
https://github.com/troglobit/finit.git
synced 2026-11-18 19:30:56 +00:00
doc: document previously secret service option respawn
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
05e6b3e752
commit
10ef0e7de6
2 files changed
+21
-2
No files matched your search
+8
-2
@@ -341,6 +341,8 @@ default 10 times before giving up and marking them as *crashed*.
|
|||||||
After which they have to be manually restarted with `initctl restart
|
After which they have to be manually restarted with `initctl restart
|
||||||
NAME`. The limits controling this are configurable, see the options
|
NAME`. The limits controling this are configurable, see the options
|
||||||
below.
|
below.
|
||||||
|
|
||||||
|
> **Tip:** to allow endless restarts, see below option `respawn`
|
||||||
|
|
||||||
For daemons that support it, we recommend appending `--foreground`,
|
For daemons that support it, we recommend appending `--foreground`,
|
||||||
`--no-background`, `-n`, `-F`, or similar command line argument to
|
`--no-background`, `-n`, `-F`, or similar command line argument to
|
||||||
@@ -411,13 +413,17 @@ As mentioned previously, services are automatically restarted, this is
|
|||||||
configurable with the following options:
|
configurable with the following options:
|
||||||
|
|
||||||
* `restart:NUM` -- number of times Finit tries to restart a crashing
|
* `restart:NUM` -- number of times Finit tries to restart a crashing
|
||||||
service, default: 10. When this limit is reached the service is
|
service, default: 10, max: 255. When this limit is reached the
|
||||||
marked *crashed* and must be restarted manually with `initctl`
|
service is marked *crashed* and must be restarted manually with
|
||||||
|
`initctl restart NAME`
|
||||||
* `restart_sec:SEC` -- number of seconds before Finit tries to restart
|
* `restart_sec:SEC` -- number of seconds before Finit tries to restart
|
||||||
a crashing service, default: 2 seconds for the first five retries,
|
a crashing service, default: 2 seconds for the first five retries,
|
||||||
then back-off to 5 seconds. The maximum of this configured value
|
then back-off to 5 seconds. The maximum of this configured value
|
||||||
and the above (2 and 5) will be used
|
and the above (2 and 5) will be used
|
||||||
* `norestart` -- dont restart on failures, same as `restart:0`
|
* `norestart` -- dont restart on failures, same as `restart:0`
|
||||||
|
* `respawn` -- bypasses the `restart` mechanism completely, allows
|
||||||
|
endless restarts. Useful in many use-cases, but not what `service`
|
||||||
|
was originally designed for so not the default behavior
|
||||||
* `oncrash:reboot` -- when all retries have failed, and the service
|
* `oncrash:reboot` -- when all retries have failed, and the service
|
||||||
has *crashed*, if this option is set the system is rebooted.
|
has *crashed*, if this option is set the system is rebooted.
|
||||||
Note, future releases may include other `oncrash:` actions
|
Note, future releases may include other `oncrash:` actions
|
||||||
|
|||||||
@@ -181,6 +181,12 @@ After which they have to be restarted manually using
|
|||||||
.Cm initctl restart NAME .
|
.Cm initctl restart NAME .
|
||||||
The number of restarts, the delay between each restart, and more is
|
The number of restarts, the delay between each restart, and more is
|
||||||
configurable, see the options below.
|
configurable, see the options below.
|
||||||
|
.Pp
|
||||||
|
.Bd -filled -offset indent
|
||||||
|
.Sy Tip:
|
||||||
|
to allow endless restarts, see below option
|
||||||
|
.Cm respawn
|
||||||
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
For daemons that support it, we recommend appending
|
For daemons that support it, we recommend appending
|
||||||
.Cm --foreground , --no-background , -n , -F ,
|
.Cm --foreground , --no-background , -n , -F ,
|
||||||
@@ -301,6 +307,13 @@ and the above (2 and 5) will be used
|
|||||||
.It Cm norestart
|
.It Cm norestart
|
||||||
dont restart on failures, same as
|
dont restart on failures, same as
|
||||||
.Cm restart:0
|
.Cm restart:0
|
||||||
|
.It Cm respawn
|
||||||
|
bypasses the
|
||||||
|
.Cm restart
|
||||||
|
mechanism completely, allows endless restarts. Useful in many
|
||||||
|
use-cases, but not what
|
||||||
|
.Cm service
|
||||||
|
was originally designed for so not the default behavior.
|
||||||
.It Cm oncrash:reboot
|
.It Cm oncrash:reboot
|
||||||
when all retries have failed, and the service
|
when all retries have failed, and the service
|
||||||
has
|
has
|
||||||
|
|||||||
Reference in new issue
Block a user