From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id UNDjAE+WRmV6dAAAauVa8A:P1 (envelope-from ) for ; Sat, 04 Nov 2023 20:06:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UNDjAE+WRmV6dAAAauVa8A (envelope-from ) for ; Sat, 04 Nov 2023 20:06:55 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BB6A3340A8 for ; Sat, 4 Nov 2023 20:06:54 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699124814; a=rsa-sha256; cv=none; b=La1SfH6Jf4kZ2nRQgjQ5MqthtbFTpyeyqh+KEo8XkUyRt1haCyol58T5zy6OZxJiUCLOmj Tk6L5swRMU93zOxGCIblF4RkKJD/hsSXD7kVGUvdE5FMEN8igydy4KoBG8f7D3MOc2K8aH hHST3W2I1tgv+7cfuoycWsNLJTUTCB/QA3fwLhJV0mPQqUenUzXHKfI/ZXcrfQiOmkenwo QU+ycJMV/h37HArP2kK3kCOvtFF9+WPIxx0WOvhGMlvgjsJTPQS+m2gtYcHtZs3CXjQ4ar R0Ir8C+Ge2/d6IY90DsndLGl4msL1a0JXRmdkX8mgA+k/nzF/pDG8FpDYmffkQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699124814; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=98qbxYTyVQ5NVQy8Kghz6U+dsyfYKS7Y9eryqO2ikdg=; b=qO72pC2l5gf6HlfYYyZQ2oVzTOczbSosTbR3h4jymlu/BdVcsr0OBhiPWaYoFNo5HVPhyf R7+67y4wOh2LunqbDthxN/QBhio8Rm/aIMpE6oauMA1ma9ehhdOftsAzCLRS9gSUN6BEvr KD54jirAgd6+UhjAsYrfJDFy1e3T/3kd+oIxJihU2Jxri4xlINJCsRzrGp4hBlRSx6XFNr 3VeZs8QPquCrFshVms4rtETEA38mQXZdcWMbkua/ulAjeeAXJIhOdIS59TQOhF2X4IJWWn 4D64HX0jrel7JQ0xFSbOZyYgfpsWRnImaFpTxQrWN8gfOe+jbeEzQAuJDLQLSA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzLyc-0001p5-2H; Sat, 04 Nov 2023 15:06:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qzLyU-0001oL-S1 for guix-patches@gnu.org; Sat, 04 Nov 2023 15:06:26 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzLyU-00062D-K2 for guix-patches@gnu.org; Sat, 04 Nov 2023 15:06:26 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzLz4-0003cm-Sc for guix-patches@gnu.org; Sat, 04 Nov 2023 15:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66935] [PATCH 2/4] services: dovecot: Add 'reopen action. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Nov 2023 19:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66935 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66935@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 66935-submit@debbugs.gnu.org id=B66935.169912481413894 (code B ref 66935); Sat, 04 Nov 2023 19:07:02 +0000 Received: (at 66935) by debbugs.gnu.org; 4 Nov 2023 19:06:54 +0000 Received: from localhost ([127.0.0.1]:35742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzLyw-0003bz-9j for submit@debbugs.gnu.org; Sat, 04 Nov 2023 15:06:54 -0400 Received: from smtpmciv2.myservices.hosting ([185.26.107.238]:55910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzLyt-0003bM-RN for 66935@debbugs.gnu.org; Sat, 04 Nov 2023 15:06:52 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv2.myservices.hosting (Postfix) with ESMTP id 8F8A820D9F for <66935@debbugs.gnu.org>; Sat, 4 Nov 2023 20:06:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id F0EA680095; Sat, 4 Nov 2023 20:06:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MB0g4KuO0r8N; Sat, 4 Nov 2023 20:06:08 +0100 (CET) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 5754380060; Sat, 4 Nov 2023 20:06:08 +0100 (CET) From: Bruno Victal Date: Sat, 4 Nov 2023 19:05:59 +0000 Message-ID: <3cf67232f27b28c4b728142f2c2d626b14b337b0.1699124200.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: BB6A3340A8 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -3.61 X-Spam-Score: -3.61 X-TUID: AwDlUbprQeW2 * 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 ;;; Copyright © 2019 Kristofer Buffington ;;; Copyright © 2020 Jonathan Brielmaier +;;; Copyright © 2023 Bruno Victal ;;; ;;; 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