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.
<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
<programlisting><![CDATA[[Unit]
Requires=nginx.service
After=nginx.service
+Requires=proxy-to-nginx.service
+After=proxy-to-nginx.service
JoinsNamespaceOf=nginx.service
[Service]