Changes to update Tomato RAF.
[tomato.git] / release / src / router / dnsmasq / debian / systemd.service
blobd75ab62ab95314ece7992c345bfea7a42fce8b61
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 --pid-file --enable-dbus 
17 # to disable writing a pid-file (not needed with systemd) and 
18 # enable DBus by default because we use DBus activation.
20 ExecStart=/etc/init.d/dnsmasq systemd-exec
22 # The systemd-*-resolvconf functions configure (and deconfigure)
23 # resolvconf to work with the dnsmasq DNS server. They're called liek
24 # this to get correct error handling (ie don't start-resolvconf if the 
25 # dnsmasq daemon fails to start.
26 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf
27 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf
30 ExecReload=/bin/kill -HUP $MAINPID
32 [Install]
33 WantedBy=multi-user.target