diff options
author | Jean-Baptiste Note <jean-baptiste.note@m4x.org> | 2024-04-30 15:36:21 +0000 |
---|---|---|
committer | Guix Patches Tester <> | 2024-04-30 17:44:48 +0200 |
commit | 3387c56704b6ea737bdf8cc13f86b03c51a3f9d7 (patch) | |
tree | 3dad20efae8ad820ef71c33a5ea959387949b62a | |
parent | ddf3759645ba76ef532658a257ae74fe0b1788b5 (diff) | |
download | guix-patches-3387c56704b6ea737bdf8cc13f86b03c51a3f9d7.tar guix-patches-3387c56704b6ea737bdf8cc13f86b03c51a3f9d7.tar.gz |
services: syslog: Add extra-options argument to syslog service.
* gnu/services/base.scm (<syslog-configuration>): Add extra-options field.
(syslog-shepherd-service): Use it when running the service.
* doc/guix.texi: Document it.
Change-Id: I540d070b9a9678b45ec9fa28d6fdc761f9b3fd9a
-rw-r--r-- | doc/guix.texi | 3 | ||||
-rw-r--r-- | gnu/services/base.scm | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 3f5d4e7f0d..965f155845 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19442,6 +19442,9 @@ The syslog configuration file to use. @xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more information on the configuration file syntax. +@item @code{extra-options} (default: @code{'()}) +List of extra command-line options for @command{syslog}. + @end table @end deftp diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 3f912225a0..702e8e0f9e 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1551,7 +1551,9 @@ mail.* -/var/log/maillog (syslogd syslog-configuration-syslogd (default (file-append inetutils "/libexec/syslogd"))) (config-file syslog-configuration-config-file - (default %default-syslog.conf))) + (default %default-syslog.conf)) + (extra-options syslog-configuration-extra-options + (default '()))) ;;; Note: a static file name is used for syslog.conf so that the reload action ;;; work as intended. @@ -1587,7 +1589,8 @@ reload its settings file."))) ;; action work as intended. (start #~(make-forkexec-constructor (list #$(syslog-configuration-syslogd config) - #$(string-append "--rcfile=" syslog.conf)) + #$(string-append "--rcfile=" syslog.conf) + #$@(syslog-configuration-extra-options config)) #:file-creation-mask #o137 #:pid-file "/var/run/syslog.pid")) (stop #~(make-kill-destructor)))) |