github.com/hernad/nomad@v1.6.112/e2e/terraform/packer/ubuntu-jammy-amd64/dnsmasq.service (about) 1 [Unit] 2 Description=dnsmasq - A lightweight DHCP and caching DNS server 3 Requires=network.target 4 Wants=nss-lookup.target 5 Before=nss-lookup.target 6 After=network.target 7 After=docker.service 8 9 [Service] 10 Type=forking 11 PIDFile=/run/dnsmasq/dnsmasq.pid 12 13 # Configure our hosts and resolver file with info from the host, 14 # then test the resulting config file before starting 15 ExecStartPre=/usr/local/bin/dnsconfig.sh 16 17 # (from upstream) 18 # We run dnsmasq via the /etc/init.d/dnsmasq script which acts as a 19 # wrapper picking up extra configuration files and then execs dnsmasq 20 # itself, when called with the "systemd-exec" function. 21 ExecStart=/etc/init.d/dnsmasq systemd-exec 22 23 # (from upstream) 24 # The systemd-*-resolvconf functions configure (and deconfigure) 25 # resolvconf to work with the dnsmasq DNS server. They're called like 26 # this to get correct error handling (ie don't start-resolvconf if the 27 # dnsmasq daemon fails to start. 28 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf 29 30 # We need to tell docker to pick up the changes 31 ExecStartPost=/bin/systemctl restart docker 32 33 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf 34 ExecReload=/bin/kill -HUP $MAINPID 35 36 [Install] 37 WantedBy=multi-user.target