doc: document previously secret service option respawn

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2022-04-22 07:21:19 +02:00
1 parent 05e6b3e752
commit 10ef0e7de6
2 files changed
+21 -2

No files matched your search

+8 -2
View File
@@ -342,6 +342,8 @@ 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
prevent them from forking off a sub-process in the background. This is prevent them from forking off a sub-process in the background. This is
@@ -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
+13
View File
@@ -182,6 +182,12 @@ After which they have to be restarted manually using
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 .Pp
.Bd -filled -offset indent
.Sy Tip:
to allow endless restarts, see below option
.Cm respawn
.Ed
.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 ,
or similar command line argument to prevent them from forking off a or similar command line argument to prevent them from forking off a
@@ -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