diff options
author | Alex Kost <alezost@gmail.com> | 2015-03-28 15:42:23 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2015-04-01 20:54:37 +0300 |
commit | 1bb76f75232c755ff70a43bffa28745f9a32aceb (patch) | |
tree | 71b2563c2725c539f320d23f12228f705edb4e95 | |
parent | bfe3c6857251c1fff24317da602b9cd762c1c112 (diff) | |
download | guix-1bb76f75232c755ff70a43bffa28745f9a32aceb.tar.gz |
services: syslog-service: Add 'config-file' argument.
* gnu/services/base.scm (syslog-service): Add 'config-file' keyword argument. * doc/guix.texi (Base Services): Document it.
-rw-r--r-- | doc/guix.texi | 5 | ||||
-rw-r--r-- | gnu/services/base.scm | 8 |
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 |