From patchwork Thu Oct 5 13:20:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54497 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 0A33B27BBEA; Thu, 5 Oct 2023 14:23:18 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham 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 64DC527BBE2 for ; Thu, 5 Oct 2023 14:23:12 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoOJW-00063f-Ku; Thu, 05 Oct 2023 09:22:50 -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 1qoOJR-00062U-9A for guix-patches@gnu.org; Thu, 05 Oct 2023 09:22:45 -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 1qoOJP-00082p-UY for guix-patches@gnu.org; Thu, 05 Oct 2023 09:22:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoOJi-0003Zu-3r for guix-patches@gnu.org; Thu, 05 Oct 2023 09:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66360] [PATCH] doc: Use herd for cerbot deploy hook example. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Oct 2023 13:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66360@debbugs.gnu.org Cc: Bruno Victal X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169651213113693 (code B ref -1); Thu, 05 Oct 2023 13:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Oct 2023 13:22:11 +0000 Received: from localhost ([127.0.0.1]:46268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoOIt-0003Yn-8c for submit@debbugs.gnu.org; Thu, 05 Oct 2023 09:22:11 -0400 Received: from lists.gnu.org ([2001:470:142::17]:39010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoOIo-0003Y6-OS for submit@debbugs.gnu.org; Thu, 05 Oct 2023 09:22:09 -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 1qoOIL-0005rr-Pk for guix-patches@gnu.org; Thu, 05 Oct 2023 09:21:37 -0400 Received: from smtpm4.myservices.hosting ([185.26.105.235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoOII-0007tK-Vo for guix-patches@gnu.org; Thu, 05 Oct 2023 09:21:37 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id A686020D71 for ; Thu, 5 Oct 2023 15:21:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id D0A7580095; Thu, 5 Oct 2023 15:21:31 +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 z1RN7GbECCuO; Thu, 5 Oct 2023 15:21:31 +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 4E07280092; Thu, 5 Oct 2023 15:21:31 +0200 (CEST) From: Bruno Victal Date: Thu, 5 Oct 2023 14:20:49 +0100 Message-ID: <1e6aa96a1ed21a5cad335ba2693f09b20a4767d4.1696512049.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=185.26.105.235; envelope-from=mirai@makinata.eu; helo=smtpm4.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 * doc/guix.texi (Certificate Services): Replace PID file based example with one using (gnu services herd). Rename %nginx-deploy-hook to %certbot-deploy-hook. --- doc/guix.texi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) base-commit: 044a76c280c26b8ea731c4367d74474805b7257a diff --git a/doc/guix.texi b/doc/guix.texi index 8c5697589f..c54bfc0154 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31935,11 +31935,12 @@ Certificate Services must be a @code{certbot-configuration} record as in this example: @lisp -(define %nginx-deploy-hook - (program-file - "nginx-deploy-hook" - #~(let ((pid (call-with-input-file "/var/run/nginx/pid" read))) - (kill pid SIGHUP)))) +(define %certbot-deploy-hook + (program-file "certbot-deploy-hook.scm" + (with-imported-modules '((gnu services herd)) + #~(begin + (use-modules (gnu services herd)) + (with-shepherd-action 'nginx ('reload) result result))))) (service certbot-service-type (certbot-configuration @@ -31948,7 +31949,7 @@ Certificate Services (list (certificate-configuration (domains '("example.net" "www.example.net")) - (deploy-hook %nginx-deploy-hook)) + (deploy-hook %certbot-deploy-hook)) (certificate-configuration (domains '("bar.example.net"))))))) @end lisp