sample-etc_systemd.service: order after nss-lookup.target

This improves the chances that the local DNS resolver (e.g. dnsmasq,
systemd-resolved, Unbound) is up before the service runs and avoids
DNS related failures.

Pull in network-online.target via Wants= to comply with its description
in the systemd.special(7) man page and remove the redundant
"After=network.target" since network-online.target already orders itself
after network.target.
This commit is contained in:
nl6720 2023-04-10 19:40:41 +03:00
parent a1e68a5b21
commit 6312030c57
No known key found for this signature in database
GPG key ID: 5CE88535E188D369

View file

@ -1,6 +1,7 @@
[Unit]
Description=Dynamic DNS Update Client
After=network.target network-online.target
Wants=network-online.target
After=network-online.target nss-lookup.target
[Service]
Type=forking