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

2020-08-31 Thread Tom Browder
On Mon, Aug 31, 2020 at 10:43 AM Arian Van Putten  wrote:
>
> I can recommend the "Systemd for Administrators" series on 
> http://0pointer.net/blog/archives.html as a good cookbook introduction to 
> systemd

Thank you, Arian.

Best regards,

-Tom
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2020-08-31 Thread Arian Van Putten
I can recommend the "Systemd for Administrators" series on
http://0pointer.net/blog/archives.html as a good cookbook introduction to
systemd

On Fri, Aug 28, 2020 at 4:47 PM Tom Browder  wrote:

> I want to create a service file that has to consider other services. I
> have looked at the man pages and probably don't have enough life expectancy
> to properly grok them.
>
> Can anyone point to a good book or cookbook for systemd?
>
> Digital Ocean has the best I've found so far. Most "recipes" seem to be
> like Github's where each reads like an old Saturday morning movie serial as
> in "you've just found out how to write one line in one file. See my next
> article on how to write the second line of another file."
>
> Best regards,
>
> -Tom
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>


-- 



*Zeta Project Germany GmbH  *l  Rosenthaler Straße 40,
10178
Berlin,

Germany




Geschäftsführer/Managing Director: Morten J. Broegger, Dylan Riley

HRB 149847 beim Handelsregister Charlottenburg, Berlin

VAT-ID DE288748675
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2020-08-29 Thread Tom Browder
On Sat, Aug 29, 2020 at 12:22 PM Reindl Harald  wrote:
> Am 29.08.20 um 19:17 schrieb Tom Browder:
...
> make the script (besides that scripts don't belong to /etc) a

I will change that.

> oneshot-service and learn about
> https://www.freedesktop.org/software/systemd/man/systemd.target.html
>
> the probably easier option would be ExecStartPost/ExecStopPost in a
> dropin in /etc/systemd/system/apache2.service.d/whatever.conf
>
> https://coreos.com/os/docs/latest/using-systemd-drop-in-units.html

Thanks very much, Reind.

Best regards,

-Tom
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2020-08-29 Thread Reindl Harald


Am 29.08.20 um 19:17 schrieb Tom Browder:
> On Fri, Aug 28, 2020 at 11:12 Andrei Borzenkov  > 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)

make the script (besdies that scripts don't belong to /etc) a
oneshot-service and learn about
https://www.freedesktop.org/software/systemd/man/systemd.target.html

the probably easier option would be ExecStartPost/ExecStopPost in a
dropin in /etc/systemd/system/apache2.service.d/whatever.conf

https://coreos.com/os/docs/latest/using-systemd-drop-in-units.html

no need for books, these are basic tasks

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2020-08-29 Thread Tom Browder
On Fri, Aug 28, 2020 at 11:12 Andrei Borzenkov  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

>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2020-08-28 Thread Andrei Borzenkov
28.08.2020 17:47, Tom Browder пишет:
> I want to create a service file that has to consider other services. I have

What does it mean?

> looked at the man pages and probably don't have enough life expectancy to
> properly grok them.
> 

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

> Can anyone point to a good book or cookbook for systemd?
> 
> Digital Ocean has the best I've found so far. Most "recipes" seem to be
> like Github's where each reads like an old Saturday morning movie serial as
> in "you've just found out how to write one line in one file. See my next
> article on how to write the second line of another file."
> 
> Best regards,
> 
> -Tom
> 
> 
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel