guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

16/67: services: herd: Allow to pass arguments to start-service.


From: guix-commits
Subject: 16/67: services: herd: Allow to pass arguments to start-service.
Date: Wed, 16 Jan 2019 19:00:37 -0500 (EST)

civodul pushed a commit to branch wip-newt-installer
in repository guix.

commit 8c28605b04a0bc7635c8d32ee5c5085efd921f5f
Author: Mathieu Othacehe <address@hidden>
Date:   Wed Dec 5 14:13:38 2018 +0900

    services: herd: Allow to pass arguments to start-service.
    
    * gnu/services/herd.scm (start-service)[arguments]: New optional argument.
---
 gnu/services/herd.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index 8ff8177..9fe757f 100644
--- a/gnu/services/herd.scm
+++ b/gnu/services/herd.scm
@@ -252,9 +252,10 @@ when passed a service with an already-registered name."
                             services
                             (remove registered? services))))))
 
-(define (start-service name)
-  (with-shepherd-action name ('start) result
-    result))
+(define* (start-service name #:optional (arguments '()))
+  (invoke-action name 'start arguments
+                 (lambda (result)
+                   result)))
 
 (define (stop-service name)
   (with-shepherd-action name ('stop) result



reply via email to

[Prev in Thread] Current Thread [Next in Thread]