diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-11-11 18:54:25 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-11-18 15:44:39 +0100 |
commit | ebc7de6a1efb702fd0364128cbde19697966c4f4 (patch) | |
tree | cd959c5cb0375fd6ba1515270e344c67ec48fd40 /gnu/services/shepherd.scm | |
parent | ff00cdcd92d92d5b8ab9a97e66e0afada4405be7 (diff) |
services: shepherd: Define 'shepherd-configuration-action' helper.
* gnu/services/shepherd.scm (shepherd-configuration-action): New
* doc/guix.texi (Shepherd Services): Document it.
Diffstat (limited to 'gnu/services/shepherd.scm')
-rw-r--r-- | gnu/services/shepherd.scm | 12 |
1 files changed, 12 insertions, 0 deletions
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 @@ shepherd-action-documentation shepherd-action-procedure + shepherd-configuration-action + %default-modules shepherd-service-file @@ -333,6 +335,16 @@ and return the resulting '.go' file. SHEPHERD is used as shepherd package." #: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." |