1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-22 09:05:54 +02:00

services: shepherd: Define 'shepherd-configuration-action' helper.

* gnu/services/shepherd.scm (shepherd-configuration-action): New
* doc/guix.texi (Shepherd Services): Document it.
This commit is contained in:
Ludovic Courtès
2022-11-11 18:54:25 +01:00
parent ff00cdcd92
commit ebc7de6a1e
2 changed files with 45 additions and 0 deletions
+12
View File
@@ -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."