[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#66935] [PATCH v2 2/4] services: dovecot: Add 'reopen action.
From: |
Bruno Victal |
Subject: |
[bug#66935] [PATCH v2 2/4] services: dovecot: Add 'reopen action. |
Date: |
Tue, 7 Nov 2023 15:04:50 +0000 |
* gnu/services/mail.scm (dovecot-shepherd-service): Re-indent.
Add 'reopen action.
Change-Id: I333032ec6f8a451c22490e27910793410c63a6d6
---
gnu/services/mail.scm | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index b865a67630..0f287ab93e 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Kristofer Buffington <kristoferbuffington@gmail.com>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1575,14 +1576,28 @@ (define (dovecot-shepherd-service config)
(let ((dovecot (if (opaque-dovecot-configuration? config)
(opaque-dovecot-configuration-dovecot config)
(dovecot-configuration-dovecot config))))
- (list (shepherd-service
- (documentation "Run the Dovecot POP3/IMAP mail server.")
- (provision '(dovecot))
- (requirement '(pam networking))
- (start #~(make-forkexec-constructor
- (list #$(file-append dovecot "/sbin/dovecot")
- "-F")))
- (stop #~(make-kill-destructor))))))
+ (list
+ (shepherd-service
+ (documentation "Run the Dovecot POP3/IMAP mail server.")
+ (provision '(dovecot))
+ (requirement '(pam networking))
+ (start #~(make-forkexec-constructor
+ (list #$(file-append dovecot "/sbin/dovecot")
+ "-F")))
+ (stop #~(make-kill-destructor))
+ (actions
+ (list (shepherd-action
+ (name 'reopen)
+ (documentation "Re-open log files.")
+ (procedure
+ #~(lambda (pid)
+ (if pid
+ (begin
+ (kill pid SIGUSR1)
+ (format #t
+ "Issued SIGUSR1 to Service Dovecot (PID ~a)."
+ pid))
+ (format #t "Service Dovecot is not running.")))))))))))
(define %dovecot-pam-services
(list (unix-pam-service "dovecot")))
--
2.41.0
[bug#66935] [PATCH v2 2/4] services: dovecot: Add 'reopen action.,
Bruno Victal <=
[bug#66935] [PATCH v2 4/4] services: dovecot: Fix ssl? description in inet-listener-configuration., Bruno Victal, 2023/11/07
[bug#66935] [PATCH v2 3/4] services: dovecot: Refactor serialization process., Bruno Victal, 2023/11/07
[bug#66935] [PATCH v2 1/4] services: dovecot: Use make-kill-destructor for action stop., Bruno Victal, 2023/11/07