GNU bug report logs -
#59197
[PATCH 0/3] Support 'herd configuration SERVICE' to view config file
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Fri, 11 Nov 2022 18:12:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 59197 <at> debbugs.gnu.org (full text, mbox):
* 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
This bug report was last modified 2 years and 185 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.