From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QCzbKweRbmO0eAAAbAwnHQ (envelope-from ) for ; Fri, 11 Nov 2022 19:14:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8IQFKweRbmOUAAEAG6o9tA (envelope-from ) for ; Fri, 11 Nov 2022 19:14:31 +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 7A31415108 for ; Fri, 11 Nov 2022 19:14:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otYXV-00051c-Nj; Fri, 11 Nov 2022 13:14:05 -0500 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 1otYXS-00050R-RG for guix-patches@gnu.org; Fri, 11 Nov 2022 13:14:02 -0500 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 1otYXS-0002q3-Iu for guix-patches@gnu.org; Fri, 11 Nov 2022 13:14:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otYXS-0006F4-EY for guix-patches@gnu.org; Fri, 11 Nov 2022 13:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59197] [PATCH 1/3] services: shepherd: Define 'shepherd-configuration-action' helper. References: <20221111181131.4171-1-ludo@gnu.org> In-Reply-To: <20221111181131.4171-1-ludo@gnu.org> Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 11 Nov 2022 18:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59197 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59197@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 59197-submit@debbugs.gnu.org id=B59197.166819038223877 (code B ref 59197); Fri, 11 Nov 2022 18:14:02 +0000 Received: (at 59197) by debbugs.gnu.org; 11 Nov 2022 18:13:02 +0000 Received: from localhost ([127.0.0.1]:46706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otYWU-0006D0-3o for submit@debbugs.gnu.org; Fri, 11 Nov 2022 13:13:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otYWR-0006CS-Jj for 59197@debbugs.gnu.org; Fri, 11 Nov 2022 13:13:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otYWM-0002QK-5I; Fri, 11 Nov 2022 13:12:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=RezMu7rBRKb8VN4OIYPT/e7J8UNnusK7WgeEphpjF/w=; b=lTmiqjb+lhe3wR BqlW5JtUVKndZDUfPwjn5+OXxLKRrmH3v5LVvlpADKTZONca0eB0nHDkt/JB2Kv9f8a4R3FeK9rTn Hd9mIS4Sv06zlrTS4KTcuUeiqLs8dmwdW2Qonj61PRslkB8VNPYDlV5vw2Z1YveqBOLI9rWW3ists m6bpsOVhbT4O8Q1LZ2GTELxrP/idLUJzOteUSXfYiBY0ahUtAgBDP2HQ3KdlJqZhdPtGMc8NHjy+P 6XL6iyD14n38Y1z3yI/9TXEnd0iKppyHkH+1IpM/ZVrjaNc4sY+C/c4yEVNpYg4/xOD0jGU+md0Ao 41MjKxs50Qliu52Q00rw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otYWL-00032K-M8; Fri, 11 Nov 2022 13:12:53 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 11 Nov 2022 19:12:44 +0100 Message-Id: <20221111181246.4217-1-ludo@gnu.org> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668190471; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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:dkim-signature; bh=RezMu7rBRKb8VN4OIYPT/e7J8UNnusK7WgeEphpjF/w=; b=okOPsZq/DGJUdIryjxxt1HFs1hD4Fb67MJAf8UGHi76ZWsbZMO7rSDAPdpmkGKMJec8CHC BP8mh0c9RyEhUOyCcQ7r+yz2nWWNRq+N9DUKyRiuTVAW6NyXJrPWh349+D6r710vbguIrP Y8NMOEhUOBfs6BE+L/o1hkClly/XXuctzKU99Pa+ZH1/wdmeGZDbsQQomt+GmJlj4COhmu fABEDuNTMLwvM2d0UhO3ANSkiQOYFG7AYgmLlUsBhuPOLNIbjKG7ect4M4KM1nfb11MJvS MfBm1hkVpvVMA6G8PKPs7dz+RDypYBBkOIDrAG7BGMmkv+gH8fwNW5aiSsNupQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668190471; a=rsa-sha256; cv=none; b=SGfQQltZyS4K8u9aJC+ENak+qecPNZQ9pDASky/UIu0o3itXgTRPDNXGfLgqg2wFiMHiM6 XyVuG6PWQWp+6C2kzE4kS9PRUN19EykkQtCrn82Zrd3Hxtbd6XVmzN2tdR2eoDfT0Du0Fu 7eNWHl0wKChEgA9AJsNgHkdcqBN5P8+V5dppK5PprK0tnA4oJn+SEg5zh8yA5XUUSbeVLe TeeE0EDPhqCa5Nhyy4bEDQD0j6Dg6kSC3NkZiWIf6QXHN+Dts0SXtXU3+wTcfJIVGfWL7W 2OQUxl6oKO8XsAPlRBOD+Rnqmt5oCO3dhskj55snytVM22HZKiFFarPl9NgzvQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=lTmiqjb+; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -2.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=lTmiqjb+; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: 7A31415108 X-Spam-Score: -2.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: 85RZ2JQYY0Dr * gnu/services/shepherd.scm (shepherd-configuration-action): New procedure. --- gnu/services/shepherd.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index 7110e5aa89..b2601c0128 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -66,6 +66,8 @@ (define-module (gnu services shepherd) shepherd-action-documentation shepherd-action-procedure + shepherd-configuration-action + %default-modules shepherd-service-file @@ -333,6 +335,16 @@ (define shepherd&co #:options '(#:local-build? #t #:substitutable? #f))))) +(define (shepherd-configuration-action file) + "Return a 'configuration' action to display FILE, which should be the name +of the service's configuration file." + (shepherd-action + (name 'configuration) + (documentation "Display the name of this service's configuration file.") + (procedure #~(lambda (_) + (format #t "~a~%" #$file) + #$file)))) + (define (shepherd-configuration-file services shepherd) "Return the shepherd configuration file for SERVICES. SHEPHERD is used as shepherd package." -- 2.38.0