From patchwork Mon Apr 3 11:58:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 11962 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 38B86172B8; Mon, 3 Apr 2023 13:00:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A502716FE1 for ; Mon, 3 Apr 2023 13:00:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjIr0-0006B8-6E; Mon, 03 Apr 2023 08:00:06 -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 1pjIqw-0006AX-Rj for guix-patches@gnu.org; Mon, 03 Apr 2023 08:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjIqw-00046v-GF for guix-patches@gnu.org; Mon, 03 Apr 2023 08:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjIqw-0006cU-Bk for guix-patches@gnu.org; Mon, 03 Apr 2023 08:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62490] [PATCH v2 2/2] services: nginx: Add reopen action. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Apr 2023 12:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62490 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62490@debbugs.gnu.org Cc: ludo@gnu.org, Bruno Victal , maxim.cournoyer@gmail.com Received: via spool by 62490-submit@debbugs.gnu.org id=B62490.168052316825376 (code B ref 62490); Mon, 03 Apr 2023 12:00:02 +0000 Received: (at 62490) by debbugs.gnu.org; 3 Apr 2023 11:59:28 +0000 Received: from localhost ([127.0.0.1]:43586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjIqN-0006bE-M6 for submit@debbugs.gnu.org; Mon, 03 Apr 2023 07:59:27 -0400 Received: from smtpmciv2.myservices.hosting ([185.26.107.238]:46042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjIqL-0006b4-G8 for 62490@debbugs.gnu.org; Mon, 03 Apr 2023 07:59:25 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv2.myservices.hosting (Postfix) with ESMTP id 202A120513; Mon, 3 Apr 2023 13:59:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id AE0BC800AF; Mon, 3 Apr 2023 13:59:23 +0200 (CEST) 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 KSsGCiCdxVLu; Mon, 3 Apr 2023 13:59:23 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 23987800AE; Mon, 3 Apr 2023 13:59:23 +0200 (CEST) From: Bruno Victal Date: Mon, 3 Apr 2023 12:58:03 +0100 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: <4027e6a1d7a59e11a7f4000b821283a1985f1dcc.1680523067.git.mirai@makinata.eu> References: <4027e6a1d7a59e11a7f4000b821283a1985f1dcc.1680523067.git.mirai@makinata.eu> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is required to allow log file rotations using rottlog, etc. * gnu/services/web.scm (nginx-shepherd-service): Add reopen shepherd action. --- gnu/services/web.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 4fe9c2d9ab..45897d7d6f 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -840,7 +840,11 @@ (define (nginx-shepherd-service config) the same configuration file. It is useful for situations where the same nginx configuration file can point to different things after a reload, such as renewed TLS certificates, or @code{include}d files.") - (procedure (nginx-action "-s" "reload")))))))))) + (procedure (nginx-action "-s" "reload"))) + (shepherd-action + (name 'reopen) + (documentation "Re-open log files.") + (procedure (nginx-action "-s" "reopen")))))))))) (define nginx-service-type (service-type (name 'nginx)