dnsmasq 2.72+ up to December 9 2014
[tomato.git] / release / src / router / dnsmasq / debian / systemd.service
blob139eddc51b571e655221677b786942ba9d6d1798
1 [Unit]
2 Description=A lightweight DHCP and caching DNS server
4 [Service]
5 Type=dbus
6 BusName=uk.org.thekelleys.dnsmasq
8 # Test the config file and refuse starting if it is not valid.
9 ExecStartPre=/usr/sbin/dnsmasq --test
11 # We run dnsmasq via the /etc/init.d/dnsmasq script which acts as a
12 # wrapper picking up extra configuration files and then execs dnsmasq
13 # itself, when called with the "systemd-exec" function.
15 # It also adds the command-line flags
16 #    --keep-in-foreground --enable-dbus
17 # to enable DBus by default because we use DBus activation.
19 ExecStart=/etc/init.d/dnsmasq systemd-exec
21 # The systemd-*-resolvconf functions configure (and deconfigure)
22 # resolvconf to work with the dnsmasq DNS server. They're called liek
23 # this to get correct error handling (ie don't start-resolvconf if the 
24 # dnsmasq daemon fails to start.
25 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf
26 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf
29 ExecReload=/bin/kill -HUP $MAINPID
31 [Install]
32 WantedBy=multi-user.target