summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2022-12-06 16:52:10 +0000
committerLudovic Courtès <ludo@gnu.org>2022-12-20 16:56:04 +0100
commit00f48860e9df4e83ed9527e3a9f267787ddefee5 (patch)
tree56b9d99d45b400b159088c56bb5893850bd9f825 /gnu/services
parent3011e8ae11f6fce87ee5c7f9c702f9d2e10a0e54 (diff)
services: opensmtpd: Add 'shepherd-requirement' field.
* gnu/services/mail.scm (<opensmtpd-configuration>)[shepherd-requirement]: New field. (opensmtpd-shepherd-service): Honor it. * doc/guix.texi (Mail Services): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/mail.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index dc4a7986b6..6f588679b1 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -1651,6 +1651,8 @@ by @code{dovecot-configuration}. @var{config} may also be created by
opensmtpd-configuration?
(package opensmtpd-configuration-package
(default opensmtpd))
+ (shepherd-requirement opensmtpd-configuration-shepherd-requirement
+ (default '())) ; list of symbols
(config-file opensmtpd-configuration-config-file
(default %default-opensmtpd-config-file))
(setgid-commands? opensmtpd-setgid-commands? (default #t)))
@@ -1667,10 +1669,11 @@ match from local for any action outbound
"))
(define (opensmtpd-shepherd-service config)
- (match-record config <opensmtpd-configuration> (package config-file)
+ (match-record config <opensmtpd-configuration>
+ (package config-file shepherd-requirement)
(list (shepherd-service
(provision '(smtpd))
- (requirement '(loopback))
+ (requirement `(loopback ,@shepherd-requirement))
(documentation "Run the OpenSMTPD daemon.")
(start (let ((smtpd (file-append package "/sbin/smtpd")))
#~(make-forkexec-constructor