aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi5
-rw-r--r--gnu/services/base.scm8
2 files changed, 8 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 4e549ac2ef..556f1389d4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4508,8 +4508,9 @@ external name servers do not even need to be queried.
@end defvr
-@deffn {Monadic Procedure} syslog-service
-Return a service that runs @code{syslogd} with reasonable default
+@deffn {Monadic Procedure} syslog-service [#:config-file #f]
+Return a service that runs @code{syslogd}. If configuration file name
+@var{config-file} is not specified, use some reasonable default
settings.
@end deffn
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 24e6d32359..cd1ba0b7b9 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -526,8 +526,10 @@ given @var{config}---an @code{<nscd-configuration>} object. Optionally,
(respawn? #f)))))
-(define (syslog-service)
- "Return a service that runs @code{syslogd} with reasonable default settings."
+(define* (syslog-service #:key config-file)
+ "Return a service that runs @code{syslogd}.
+If configuration file name @var{config-file} is not specified, use some
+reasonable default settings."
;; Snippet adapted from the GNU inetutils manual.
(define contents "
@@ -561,7 +563,7 @@ given @var{config}---an @code{<nscd-configuration>} object. Optionally,
(start
#~(make-forkexec-constructor
(list (string-append #$inetutils "/libexec/syslogd")
- "--no-detach" "--rcfile" #$syslog.conf)))
+ "--no-detach" "--rcfile" #$(or config-file syslog.conf))))
(stop #~(make-kill-destructor))))))
(define* (guix-build-accounts count #:key