aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2018-12-05 14:13:38 +0900
committerLudovic Courtès <ludo@gnu.org>2019-01-17 14:04:22 +0100
commitca0c43ecf02a5451ab0dd2f855032e316b4a4792 (patch)
treee20e046a57a35d88418598fff83ab601ae77f998
parentb08bea04978ee93696a2172c6c5fe2c08561a8a2 (diff)
downloadguix-ca0c43ecf02a5451ab0dd2f855032e316b4a4792.tar.gz
guix-ca0c43ecf02a5451ab0dd2f855032e316b4a4792.zip
services: herd: Allow to pass arguments to start-service.
* gnu/services/herd.scm (start-service)[arguments]: New optional argument.
-rw-r--r--gnu/services/herd.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index 8ff817759d..9fe757fb73 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