# Written by the mesh (module dnsmasq, novox/hq issue 348). Replaced on every push. # # The resolver binds its addresses once, at start (bind-interfaces), so it starts only once this # machine's private address is there: it waits up to 80 seconds for it, and a start that found it # missing is tried again every ten seconds rather than left failed. [Unit] After=network-online.target Wants=network-online.target StartLimitIntervalSec=0 [Service] ExecStartPre=/usr/bin/sh -c 'for i in $(seq 1 80); do ip -4 -o addr show to ${machine:address} | grep -q . && exit 0; sleep 1; done; echo "${machine:address} is not on this machine" >&2; exit 1' Restart=on-failure RestartSec=10s