From 00f48860e9df4e83ed9527e3a9f267787ddefee5 Mon Sep 17 00:00:00 2001 From: Bruno Victal Date: Tue, 6 Dec 2022 16:52:10 +0000 Subject: services: opensmtpd: Add 'shepherd-requirement' field. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/mail.scm ()[shepherd-requirement]: New field. (opensmtpd-shepherd-service): Honor it. * doc/guix.texi (Mail Services): Document it. Signed-off-by: Ludovic Courtès --- gnu/services/mail.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gnu/services') 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 (package config-file) + (match-record config + (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 -- cgit v1.2.3