Advertisement
kjetilk

my current dnsmasq.service

Aug 30th, 2017
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. [Unit]
  2. Description=dnsmasq - A lightweight DHCP and caching DNS server
  3. Requires=network-online.target
  4. Wants=nss-lookup.target
  5. Before=nss-lookup.target
  6. After=network-online.target
  7.  
  8. [Service]
  9. Type=forking
  10. PIDFile=/run/dnsmasq/dnsmasq.pid
  11.  
  12. # Test the config file and refuse starting if it is not valid.
  13. ExecStartPre=/usr/sbin/dnsmasq --test
  14.  
  15. # We run dnsmasq via the /etc/init.d/dnsmasq script which acts as a
  16. # wrapper picking up extra configuration files and then execs dnsmasq
  17. # itself, when called with the "systemd-exec" function.
  18. ExecStart=/etc/init.d/dnsmasq systemd-exec
  19.  
  20. # The systemd-*-resolvconf functions configure (and deconfigure)
  21. # resolvconf to work with the dnsmasq DNS server. They're called liek
  22. # this to get correct error handling (ie don't start-resolvconf if the
  23. # dnsmasq daemon fails to start.
  24. ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf
  25. ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf
  26.  
  27.  
  28. ExecReload=/bin/kill -HUP $MAINPID
  29.  
  30. [Install]
  31. WantedBy=multi-user.target
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement