From: Joe Orton
Date: Tue, 11 Feb 2020 16:20:00 +0000 (+0000)
Subject: Merge r1873835, r1873889 from trunk:
X-Git-Tag: 2.4.42~99
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f11cd71cf99309a29d68399f91d12f07ef50895;p=thirdparty%2Fapache%2Fhttpd.git
Merge r1873835, r1873889 from trunk:
mod_systemd.xml: add basic unit example [skip ci]
Add some blurb on correctly stopping the service w/mod_systemd. [skip ci]
Submitted by: elukey, jorton
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1873914 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/mod/mod_systemd.xml b/docs/manual/mod/mod_systemd.xml
index 9d53e0cf9bc..089d6296609 100644
--- a/docs/manual/mod/mod_systemd.xml
+++ b/docs/manual/mod/mod_systemd.xml
@@ -36,6 +36,41 @@
href="https://www.freedesktop.org/software/systemd/man/systemd.service.html">systemd.service(5)
for more information). The module is activated if loaded.
+
+ Example of systemd service unit (more settings are probably needed for production systems)
+
+[Unit]
+Description=The Apache HTTP Server
+After=network.target
+
+[Service]
+Type=notify
+ExecStart=/usr/local/apache2/bin/httpd -D FOREGROUND -k start
+ExecReload=/usr/local/apache2/bin/httpd -k graceful
+KillMode=mixed
+
+[Install]
+WantedBy=multi-user.target
+
+
+
+ Special attention should be given to how ExecStop
+ and/or KillMode are configured for the service. If
+ configured, an ExecStop command should be a
+ synchronous operation which itself exits when the daemon
+ has terminated. Running httpd -k stop
+ asynchronously initiates daemon termination, so does not
+ satisfy this condition. The example above uses
+ KillMode=mixed so that systemd sends
+ SIGTERM to signal the parent process (and only the
+ parent) to shut down. The entire process group is then sent
+ SIGKILL after TimeoutStopSec elapses, if
+ any processes are still running. See systemd.kill(5)
+ for more information.
+
+ This module does not provide support for Systemd socket activation.
+
ExtendedStatus is
enabled by default if the module is loaded. If ExtendedStatus is not disabled in