From 8adf53582c8b5ab486736e8f9541baf9853aa2de Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 15 Nov 2017 11:25:19 +0100 Subject: [PATCH] man: document that ExecStop= is executed during restarts Fixes: #7126 --- man/systemd.service.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 03cd14ceff0..43c6435dcba 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -461,7 +461,9 @@ start-up failed, for example because any of the commands specified in ExecStart=, ExecStartPre= or ExecStartPost= failed (and weren't prefixed with -, see above) or timed out. Use ExecStopPost= to invoke commands when a - service failed to start up correctly and is shut down again. + service failed to start up correctly and is shut down again. Also note that, service restart requests are + implemented as stop operations followed by start operations. This means that ExecStop= and + ExecStopPost= are executed during a service restart operation. It is recommended to use this setting for commands that communicate with the service requesting clean termination. When the commands specified with this option are executed it should be assumed that the service is -- 2.39.2