2 Description=dnsmasq - A lightweight DHCP and caching DNS server
3 Requires=network.target
7 PIDFile=/var/run/dnsmasq/dnsmasq.pid
9 # Test the config file and refuse starting if it is not valid.
10 ExecStartPre=/usr/sbin/dnsmasq --test
12 # We run dnsmasq via the /etc/init.d/dnsmasq script which acts as a
13 # wrapper picking up extra configuration files and then execs dnsmasq
14 # itself, when called with the "systemd-exec" function.
15 ExecStart=/etc/init.d/dnsmasq systemd-exec
17 # The systemd-*-resolvconf functions configure (and deconfigure)
18 # resolvconf to work with the dnsmasq DNS server. They're called liek
19 # this to get correct error handling (ie don't start-resolvconf if the
20 # dnsmasq daemon fails to start.
21 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf
22 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf
25 ExecReload=/bin/kill -HUP $MAINPID
28 WantedBy=multi-user.target