Re: CentOS 7, NSF, "feature"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 2 Feb 2016 20:19, "Ricardo J. Barberis" <ricardo@xxxxxxxxxxxxx> wrote:
> because the interface wasn't yet up, so I had to make a new unit and put
this
> inside (/etc/systemd/system/nginx.service):
>
> <code>
> .include /usr/lib/systemd/system/nginx.service
>
> [Unit]
> After=network.target remote-fs.target nss-lookup.target
network-online.target
> </code>
>
>
> The After line is the important one, I copied it from
> /usr/lib/systemd/system/nginx.service and added "network-online.target"
> at the end.
>
> After making your changes, be sure to reenable the service so it takes
your
> new unit, e.g.:
>
> # systemctl reenable nginx.service
>
>

1) Don't use .include as that's not recommended and deprecated behaviour.
Make an override snippet in /etc/systemd/system/nginx.service.d called
custom.conf or network.conf or something. This has the benefit as well of
working nicely with systemctl cat and systemd-delta.

2) You just need a systemctl daemon-reload after this not reenable.

3) The network targets situation is detailed (and the whys of it) in the
systemd.special man page.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux