diff options
author | Brice Waegeneire <brice@waegenei.re> | 2020-06-04 16:14:01 +0200 |
---|---|---|
committer | Brice Waegeneire <brice@waegenei.re> | 2021-05-31 22:06:54 +0200 |
commit | ea55e1355bb3d45d5f04e7cb390d2c6afa8e68e6 (patch) | |
tree | f085278c08571f543627c62a6bfbad1fd2e7aeb3 /gnu/services/dns.scm | |
parent | 62a8d487d61513d214b9aa72e7efaefde215cd9b (diff) |
services: dnsmasq: Extend 'activation-service'.
* gnu/services/dns.scm (dnsmasq-activation): New procedure …
(dnsmasq-service-type): … use it.
Diffstat (limited to 'gnu/services/dns.scm')
-rw-r--r-- | gnu/services/dns.scm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 55211cb08fd..aeb2bfdc866 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -861,12 +861,20 @@ cache.size = 100 * MB #:pid-file "/run/dnsmasq.pid")) (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 (service-type (name 'dnsmasq) (extensions (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)) (description "Run the dnsmasq DNS server."))) |