From 37d9e02d76997ce068b138a46778f413c1ca9198 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Sat, 10 Dec 2022 00:06:22 +0800 Subject: [PATCH] services: smartdns-service-type: Add option to specify log file. * rosenthal/services/dns.scm (smartdns-configuration): Add log-file option. (smartdns-shepherd-service): Honor it. --- rosenthal/services/dns.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rosenthal/services/dns.scm b/rosenthal/services/dns.scm index 7ec532d..23464d7 100644 --- a/rosenthal/services/dns.scm +++ b/rosenthal/services/dns.scm @@ -23,18 +23,22 @@ "The Smartdns package.") (config (file-like (plain-file "empty" "")) - "Configuration file for Smartdns.")) + "Configuration file for Smartdns.") + (log-file + (string "/var/log/smartdns.log") + "Where the logs go.")) (define smartdns-shepherd-service (match-lambda - (($ smartdns config) + (($ smartdns config log-file) (list (shepherd-service (documentation "Run smartdns.") (provision '(smartdns dns)) (requirement '(loopback networking)) (start #~(make-forkexec-constructor (list #$(file-append smartdns "/sbin/smartdns") - "-f" "-x" "-c" #$(file-append config)))) + "-f" "-x" "-c" #$(file-append config)) + #:log-file #$log-file)) (stop #~(make-kill-destructor))))))) (define smartdns-service-type