From 12e2683d4804326d29ebf92bba9f0dd3810a5ead Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Tue, 11 Aug 2015 12:29:45 +0000 Subject: [PATCH] man: Describe when ExecStartFoo= commands are run in more detail Previously it was just descibed that ExecStartPost= commands were started "after" the ExecStart= command(s). This hasn't specified after which event, which varies from after it has been started, after it has exited, after it has sent READY=1 or after it has taken the bus name, depending on Type=. This now describes that it happens after the *service* has "started", as defined by the Type=, and provides some clarification about precisely when this is. This may be unnecessary duplication, but it removes the ambiguity as to whether RemainAfterExit=no means that ExecStartPost= shouldn't be started because it means the service has stopped when the ExecStart= command terminates, not "started". --- man/systemd.service.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 7e96989583..4c113a3479 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -337,6 +337,19 @@ -) fail, the rest are not executed and the unit is considered failed. + ExecStart= commands are only run after + all ExecStartPre= commands that were not prefixed + with a - exit successfully. + + ExecStartPost= commands are only run after + the service has started, as determined by Type= + (i.e. The process has been started for Type=simple + or Type=idle, the process exits successfully for + Type=oneshot, the initial process exits successfully + for Type=forking, READY=1 is sent + for Type=notify, or the BusName= + has been taken for Type=dbus). + Note that ExecStartPre= may not be used to start long-running processes. All processes forked off by processes invoked via ExecStartPre= will