Config-Model-Systemd
view release on metacpan or search on metacpan
lib/Config/Model/models/Systemd/Section/Service.pl view on Meta::CPAN
them from auto-restarting, no matter whether the corresponding exit statuses are listed in this
option or not.',
'RestartMaxDelaySec' => 'Configures the longest time to sleep before restarting a service
as the interval goes up with C<RestartSteps>. Takes a value
in the same format as C<RestartSec>, or C<infinity>
to disable the setting. Defaults to C<infinity>.
This setting is effective only if C<RestartSteps> is also set and
C<RestartSec> is not zero.',
'RestartMode' => 'Takes a string value that specifies how a service should restart:
If set to C<normal> (the default), the service restarts by going through
a failed/inactive state.If set to C<direct>, the service transitions to the activating
state directly during auto-restart, skipping failed/inactive state.
C<ExecStopPost> is still invoked.
C<OnSuccess> and C<OnFailure> are skipped.This option is useful in cases where a dependency can fail temporarily but we
do not
want these temporary failures to make the dependent units fail. Dependent units are not
notified of these temporary failures.If set to C<debug>, the service manager will log messages that are
related to this unit at debug level while automated restarts are attempted, until either the
service hits the rate limit or it succeeds, and the C<$DEBUG_INVOCATION=1>
environment variable will be set for the unit. This is useful to be able to get additional
information when a service fails to start, without needing to proactively or permanently
enable debug level logging in systemd, which is very verbose. This is otherwise equivalent
to C<normal> mode.',
'RestartPreventExitStatus' => "Takes a list of exit status definitions that, when returned by the main service
process, will prevent automatic service restarts, regardless of the restart setting configured with
C<Restart>. Exit status definitions can be numeric termination statuses, termination
status names, or termination signal names, separated by spaces. Defaults to the empty list, so that,
by default, no exit status is excluded from the configured restart logic.
A service with the C<RestartPreventExitStatus> setting
RestartPreventExitStatus=TEMPFAIL 250 SIGKILL
Exit status 75 (C<TEMPFAIL>), 250, and the termination signal
C<SIGKILL> will not result in automatic service restarting.
This option may appear more than once, in which case the list of restart-preventing statuses is merged.
If the empty string is assigned to this option, the list is reset and all prior assignments of this
option will have no effect.
Note that this setting has no effect on processes configured via
C<ExecStartPre>, C<ExecStartPost>, C<ExecStop>,
C<ExecStopPost> or C<ExecReload>, but only on the main service
process, i.e. either the one invoked by C<ExecStart> or (depending on
C<Type>, C<PIDFile>, \x{2026}) the otherwise configured main
process.",
'RestartSec' => 'Configures the time to sleep before restarting
a service (as configured with C<Restart>).
Takes a unit-less value in seconds, or a time span value such
as "5min 20s". Defaults to 100ms.',
'RestartSteps' => 'Configures the number of exponential steps to take to increase the interval
of auto-restarts from C<RestartSec> to C<RestartMaxDelaySec>.
Takes a positive integer or 0 to disable it. Defaults to 0. Hint: values
between 3 and 5 are good choices when exponential backoff is desired.
Example:
RestartSec=10s
RestartSteps=4
RestartMaxDelaySec=160s
This will produce the following restart intervals: 10s, 20s, 40s, 80s, 160s, 160s, 160s, etc.
Notice the geometric interpolation and the resulting constant ratio between intervals; here it is 2.
The formula for the ratio is
(C<RestartMaxDelaySec> / C<RestartSec>)^(1 / C<RestartSteps>)
. A (repeating) delay equal to C<RestartMaxDelaySec> is always
reached after
C<RestartSteps> + 1
steps.
This setting is effective only if C<RestartMaxDelaySec> is also set and
C<RestartSec> is not zero.',
'RootDirectoryStartOnly' => 'Takes a boolean argument. If true, the root directory, as configured with the
C<RootDirectory> option (see
L<systemd.exec(5)>
for more information), is only applied to the process started with C<ExecStart>,
and not to the various other C<ExecStartPre>, C<ExecStartPost>,
C<ExecReload>, C<ExecReloadPost>, C<ExecStop>,
and C<ExecStopPost> commands. If false, the setting is applied to all
configured commands the same way. Defaults to false.',
'RuntimeMaxSec' => "Configures a maximum time for the service to run. If this is used and the service has been
active for longer than the specified time it is terminated and put into a failure state. Note that this setting
does not have any effect on C<Type=oneshot> services, as they terminate immediately after
activation completed (use C<TimeoutStartSec> to limit their activation).
Pass C<infinity> (the default) to configure no runtime limit.
If a service of C<Type=notify>/C<Type=notify-reload> sends
C<EXTEND_TIMEOUT_USEC=\x{2026}>, this may cause the runtime to be extended beyond
C<RuntimeMaxSec>. The first receipt of this message must occur before
C<RuntimeMaxSec> is exceeded, and once the runtime has extended beyond
C<RuntimeMaxSec>, the service manager will allow the service to continue to run,
provided the service repeats C<EXTEND_TIMEOUT_USEC=\x{2026}> within the interval specified
until the service shutdown is achieved by C<STOPPING=1> (or termination). (see
L<sd_notify(3)>).
",
'RuntimeRandomizedExtraSec' => 'This option modifies C<RuntimeMaxSec> by increasing the maximum runtime by an
evenly distributed duration between 0 and the specified value (in seconds). If C<RuntimeMaxSec> is
unspecified, then this feature will be disabled.
',
'Sockets' => 'Specifies the name of the socket units this
service shall inherit socket file descriptors from when the
service is started. Normally, it should not be necessary to use
this setting, as all socket file descriptors whose unit shares
the same name as the service (subject to the different unit
name suffix of course) are passed to the spawned
process.
Note that the same socket file descriptors may be passed
to multiple processes simultaneously. Also note that a
different service may be activated on incoming socket traffic
than the one which is ultimately configured to inherit the
socket file descriptors. Or, in other words: the
C<Service> setting of
C<.socket> units does not have to match the
inverse of the C<Sockets> setting of the
C<.service> it refers to.
This option may appear more than once, in which case the list of socket units is merged. Note
that once set, clearing the list of sockets again (for example, by assigning the empty string to this
option) is not supported.',
'SuccessExitStatus' => 'Takes a list of exit status definitions that, when returned by the main service
process, will be considered successful termination, in addition to the normal successful exit status
0 and, except for C<Type=oneshot>, the signals C<SIGHUP>, C<SIGINT>,
( run in 0.403 second using v1.01-cache-2.11-cpan-85f18b9d64f )