[systemd-devel] Any published books on systemd? A cookbook?

Tom Browder tom.browder at gmail.com
Sat Aug 29 17:17:44 UTC 2020


On Fri, Aug 28, 2020 at 11:12 Andrei Borzenkov <arvidjaar at gmail.com> wrote:

> 28.08.2020 17:47, Tom Browder пишет:
> > I want to create a service file that has to consider other services.

...

> If you tell us what you try to achieve, someone may have an idea how
> to express it using systemd.


Okay, here is my situation:

I have a single Apache2 httpd instance listening on ports 80 and 433. All
on port 80 is forced to 433. I am running multiple SNI virtual hosts on the
same IPv4 address via an Apache2 macro.

The apache server is successfully handled with its systemd service file
"apache2.service".

Some of the virtual hosts are running behind a reverse proxy and I will
have a script that will start them all after the "apache2.service" is
confirmed to be running.

So I need a service file called, say, "reverse-proxies.service" that would:

1. wait for the "apache2.service" to start successfully
2. execute the proxy start script called, say,
"/etc/proxy-service/start-proxy-servers"
3. restart the proxies after apache restarts
4. stop the proxies before apache stops (not strictly required)

Thanks.

Best regards,

-Tom

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200829/6983b2b7/attachment.htm>


More information about the systemd-devel mailing list