From: Bruno Victal <mirai@makinata.eu>
To: 66935@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#66935] [PATCH 2/4] services: dovecot: Add 'reopen action.
Date: Sat, 4 Nov 2023 19:05:59 +0000 [thread overview]
Message-ID: <3cf67232f27b28c4b728142f2c2d626b14b337b0.1699124200.git.mirai@makinata.eu> (raw)
In-Reply-To: <cover.1699124200.git.mirai@makinata.eu>
* 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
next prev parent reply other threads:[~2023-11-04 19:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-04 19:03 [bug#66935] [PATCH 0/4] Dovecot service refactor Bruno Victal
2023-11-04 19:05 ` [bug#66935] [PATCH 1/4] services: dovecot: Use make-kill-destructor for action stop Bruno Victal
2023-11-04 19:05 ` Bruno Victal [this message]
2023-11-04 19:06 ` [bug#66935] [PATCH 3/4] services: dovecot: Refactor serialization process Bruno Victal
2023-11-04 19:06 ` [bug#66935] [PATCH 4/4] services: dovecot: Fix incorrect type for ssl? field Bruno Victal
2023-11-05 18:03 ` Herman Rimm via Guix-patches via
2023-11-06 14:52 ` Bruno Victal
2023-11-06 15:43 ` Clément Lassieur
2023-11-07 14:52 ` Bruno Victal
2023-11-06 21:36 ` Clément Lassieur
2023-11-07 15:04 ` [bug#66935] [PATCH v2 1/4] services: dovecot: Use make-kill-destructor for action stop Bruno Victal
2023-11-07 15:04 ` [bug#66935] [PATCH v2 2/4] services: dovecot: Add 'reopen action Bruno Victal
2023-11-07 15:04 ` [bug#66935] [PATCH v2 3/4] services: dovecot: Refactor serialization process Bruno Victal
2023-11-07 15:04 ` [bug#66935] [PATCH v2 4/4] services: dovecot: Fix ssl? description in inet-listener-configuration Bruno Victal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3cf67232f27b28c4b728142f2c2d626b14b337b0.1699124200.git.mirai@makinata.eu \
--to=mirai@makinata.eu \
--cc=66935@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.