mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
services: dnsmasq: Extend 'activation-service'.
* gnu/services/dns.scm (dnsmasq-activation): New procedure … (dnsmasq-service-type): … use it.
This commit is contained in:
parent
62a8d487d6
commit
ea55e1355b
1 changed files with 9 additions and 1 deletions
|
@ -861,12 +861,20 @@ (define dnsmasq-shepherd-service
|
||||||
#:pid-file "/run/dnsmasq.pid"))
|
#:pid-file "/run/dnsmasq.pid"))
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
|
(define (dnsmasq-activation config)
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
;; create directory to store dnsmasq lease file
|
||||||
|
(mkdir-p "/var/lib/misc")))
|
||||||
|
|
||||||
(define dnsmasq-service-type
|
(define dnsmasq-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'dnsmasq)
|
(name 'dnsmasq)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension shepherd-root-service-type
|
(list (service-extension shepherd-root-service-type
|
||||||
(compose list dnsmasq-shepherd-service))))
|
(compose list dnsmasq-shepherd-service))
|
||||||
|
(service-extension activation-service-type
|
||||||
|
dnsmasq-activation)))
|
||||||
(default-value (dnsmasq-configuration))
|
(default-value (dnsmasq-configuration))
|
||||||
(description "Run the dnsmasq DNS server.")))
|
(description "Run the dnsmasq DNS server.")))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue