Add some blurb on correctly stopping the service w/mod_systemd. [skip ci]
@@ -47,13 +47,28 @@ After=network.target
Type=notify
ExecStart=/usr/local/apache2/bin/httpd -D FOREGROUND -k start
ExecReload=/usr/local/apache2/bin/httpd -k graceful
-ExecStop=/usr/local/apache2/bin/httpd -k graceful-stop
+KillMode=mixed
[Install]
WantedBy=multi-user.target
</pre>
</example>
+ <p>Special attention should be given to how <code>ExecStop</code>
+ and/or <code>KillMode</code> are configured for the service. If
+ configured, an <code>ExecStop</code> command should be a
+ <em>synchronous operation</em> which itself exits when the daemon
+ has terminated. Running <code>httpd -k stop</code>
+ <em>asynchronously</em> initiates daemon termination, so does not
+ satisfy this condition. The example above uses
+ <code>KillMode=mixed</code> so that systemd sends
+ <code>SIGTERM</code> to signal the parent process (and only the
+ parent) to shut down. The entire process group is then sent
+ <code>SIGKILL</code> after <code>TimeoutStopSec</code> elapses, if
+ any processes are still running. See <a
+ href="https://www.freedesktop.org/software/systemd/man/systemd.kill.html">systemd.kill(5)</a>
+ for more information.</p>
+
<p>This module does not provide support for Systemd socket activation.</p>
<p><directive module="core">ExtendedStatus</directive> is
