From 6312030c5796b36695c7481fcecc1a7420c30af3 Mon Sep 17 00:00:00 2001 From: nl6720 Date: Mon, 10 Apr 2023 19:40:41 +0300 Subject: [PATCH] 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. --- sample-etc_systemd.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sample-etc_systemd.service b/sample-etc_systemd.service index 5fcc1ef..cd70712 100644 --- a/sample-etc_systemd.service +++ b/sample-etc_systemd.service @@ -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