From d90b97acaff16a751d0b0153dc4a405bfceb462c Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 19 Jan 2024 23:19:11 +0100 Subject: Created target marking readiness of a net DNS resolver The whole purpose is to have something that can recognize if systemd-resolved is ready, because it complained before it. I was unable to determine better method so here we are. The dependency on host(1) from bind9/named is annoying and writing a simple getaddrinfo(3) checker could be a good step forward. --- dns-ready-check.service | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 dns-ready-check.service (limited to 'dns-ready-check.service') diff --git a/dns-ready-check.service b/dns-ready-check.service new file mode 100644 index 0000000..a945739 --- /dev/null +++ b/dns-ready-check.service @@ -0,0 +1,12 @@ +[Unit] +Description=Check if Domain Name System resolver is ready +DefaultDependencies=no +Requires=network-online.target +After=network-online.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/host example.com +Restart=on-failure +RestartSec=1 +StandardOutput=null -- cgit v1.1