X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=man%2Fsystemd.service.xml;h=c4bd65e349497531a34af4762b88b9e3aebc07ff;hp=564c7922c39905f1676805d4379bd11202ec1a1e;hb=96342de68d0d6de71a062d984dafd2a0905ed9fe;hpb=f1c8f75b38def5b2e21a83b245c5392563fba7ef diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 564c7922c..c4bd65e34 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -44,7 +44,7 @@ systemd.service - systemd service configuration files + Service unit configuration @@ -72,7 +72,10 @@ Additional options are listed in systemd.exec5, which define the execution environment the commands - are executed in. + are executed in, and in + systemd.kill5 + which define the way the processes of the service are + terminated. Unless DefaultDependencies= is set to , service units will @@ -112,7 +115,9 @@ supervises. A number of options that may be used in this section are shared with other unit types. These options are documented in - systemd.exec5. The + systemd.exec5 + and + systemd.kill5. The options specific to the [Service] section of service units are the following: @@ -417,12 +422,13 @@ configured in this option are run are terminated according to the KillMode= setting - (see below). If this option is not - specified the process is terminated - right-away when service stop is - requested. Specifier and environment - variable substitution is supported - (including + (see + systemd.kill5). If + this option is not specified the + process is terminated right-away when + service stop is requested. Specifier + and environment variable substitution + is supported (including $MAINPID, see above). @@ -457,27 +463,49 @@ - TimeoutSec= + TimeoutStartSec= Configures the time to - wait for start-up and stop. If a + wait for start-up. If a daemon service does not signal start-up completion within the - configured time the service will be + configured time, the service will be considered failed and be shut down - again. If a service is asked to stop - but does not terminate in the - specified time it will be terminated + again. + Takes a unit-less value in seconds, or a + time span value such as "5min + 20s". Pass 0 to disable the timeout + logic. Defaults to 90s, except when + Type=oneshot is + used in which case the timeout + is disabled by default. + + + + + TimeoutStopSec= + Configures the time to + wait for stop. If a service is asked + to stop but does not terminate in the + specified time, it will be terminated forcibly via SIGTERM, and after another delay of this time with - SIGKILL. (See + SIGKILL (See KillMode= - below.) Takes a unit-less value in seconds, or a + in systemd.kill5). + Takes a unit-less value in seconds, or a time span value such as "5min 20s". Pass 0 to disable the timeout - logic. Defaults to - 90s, except when Type=oneshot is - used in which case the timeout - is disabled by default. + logic. Defaults to 90s. + + + + + TimeoutSec= + A shorthand for configuring + both TimeoutStartSec= + and TimeoutStopSec= + to the specified value. + @@ -535,18 +563,34 @@ it will be restarted only when it exited with an exit code not equalling 0, when - terminated by a signal, when an - operation times out or when the + terminated by a signal (including on + core dump), when an operation (such as + service reload) times out or when the configured watchdog timeout is triggered. If set to it will be restarted only if it exits due to - reception of an uncaught signal. If - set to the - service will be restarted regardless - whether it exited cleanly or not, - got terminated abnormally by a - signal or hit a timeout. + reception of an uncaught signal + (including on core dump). If set to + the service + will be restarted regardless whether + it exited cleanly or not, got + terminated abnormally by a signal or + hit a timeout. + + + + RestartPreventExitStatus= + Specify exit status list, which + will prevent service from restart. Codes are + separated by whitespace (e.g. "1 6 SIGKILL"). + + + + SuccessExitStatus= + Specify exit status list, which + will be considered as successful exit. Codes are + separated by whitespace (e.g. "1 6 SIGKILL"). @@ -596,72 +640,6 @@ false. - - KillMode= - Specifies how - processes of this service shall be - killed. One of - , - , - . - - If set to - all - remaining processes in the control - group of this service will be - terminated on service stop, after the - stop command (as configured with - ExecStop=) is - executed. If set to - only the main - process itself is killed. If set to - no process is - killed. In this case only the stop - command will be executed on service - stop, but no process be killed - otherwise. Processes remaining alive - after stop are left in their control - group and the control group continues - to exist after stop unless it is - empty. Defaults to - . - - Processes will first be - terminated via SIGTERM (unless the - signal to send is changed via - KillSignal=). If - then after a delay (configured via the - TimeoutSec= option) - processes still remain, the - termination request is repeated with - the SIGKILL signal (unless this is - disabled via the - SendSIGKILL= - option). See - kill2 - for more - information. - - - - KillSignal= - Specifies which signal - to use when killing a - service. Defaults to SIGTERM. - - - - - SendSIGKILL= - Specifies whether to - send SIGKILL to remaining processes - after a timeout, if the normal - shutdown procedure left processes of - the service around. Takes a boolean - value. Defaults to "yes". - - - NonBlocking= Set O_NONBLOCK flag @@ -756,15 +734,27 @@ are allowed (defaults to 5). These configuration options are particularly useful in conjunction with - Restart=. Note that - units which are configured for - Restart= and which - reach the start limit are not + Restart=, however + apply to all kinds of starts + (including manual), not just those + triggered by the + Restart= logic. + Note that units which are configured + for Restart= and + which reach the start limit are not attempted to be restarted anymore, however they may still be restarted manually at a later point from which point on the restart logic is again - activated. + activated. Note that + systemctl + reset-failed will cause the + restart rate counter for a service to + be flushed, which is useful if the + administrator wants to manually start + a service and the start limit + interferes with + that. @@ -804,6 +794,13 @@ + + Check + systemd.exec5 + and + systemd.kill5 + for more settings. + @@ -874,7 +871,8 @@ systemd1, systemctl8, systemd.unit5, - systemd.exec5 + systemd.exec5, + systemd.kill5