]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: document socket requirement for systemd-socket-proxyd (#6535)
authordkg <dkg@fifthhorseman.net>
Sat, 5 Aug 2017 23:19:09 +0000 (19:19 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 5 Aug 2017 23:19:09 +0000 (19:19 -0400)
Without this requirement, if proxy-to-nginx.socket was down, and the sysadmin
were to do:

    systemctl start proxy-to-nginx.service

then the service would come up without a configured socket, which doesn't make
sense.  Normally this isn't how we expect a socket-activated service to start,
but it's possible for an admin to do this (if the .socket were already running,
the systemd-socket-proxyd process will start effectively idle).  But the
.service shouldn't end up in a broken state if the .socket isn't already
listening.

Adding the explicit Requires: should ensure that an admin with this
configuration state can't accidentally break their system.

man/systemd-socket-proxyd.xml

index b8a7800b82a1e360550340b9aff470ec56fcb38c..96702a89393576f0e72b699e5cf7be64b49c0f94 100644 (file)
@@ -118,6 +118,8 @@ WantedBy=sockets.target]]></programlisting>
         <programlisting><![CDATA[[Unit]
 Requires=nginx.service
 After=nginx.service
+Requires=proxy-to-nginx.socket
+After=proxy-to-nginx.service
 
 [Service]
 ExecStart=/usr/lib/systemd/systemd-socket-proxyd /tmp/nginx.sock
@@ -159,6 +161,8 @@ WantedBy=sockets.target]]></programlisting>
         <programlisting><![CDATA[[Unit]
 Requires=nginx.service
 After=nginx.service
+Requires=proxy-to-nginx.service
+After=proxy-to-nginx.service
 JoinsNamespaceOf=nginx.service
 
 [Service]