summary refs log tree commit diff
path: root/gnu/services
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2020-02-27 16:42:36 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2020-03-03 15:00:32 +0100
commit8f5a0a97b1d04e8ade8c16694dcb72aed176c595 (patch)
tree757982cc068a33b5bb40f36705a59776fd266403 /gnu/services
parent1e8fef19b6320d3382a4a69273e5aae8d49e9c41 (diff)
downloadguix-8f5a0a97b1d04e8ade8c16694dcb72aed176c595.tar.gz
services: herd: Add restart-service.
* gnu/services/herd.scm (restart-service): New exported procedure.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/herd.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index 112a7dc104..35d69376d0 100644
--- a/gnu/services/herd.scm
+++ b/gnu/services/herd.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -55,7 +55,8 @@
             load-services
             load-services/safe
             start-service
-            stop-service))
+            stop-service
+            restart-service))
 
 ;;; Commentary:
 ;;;
@@ -272,6 +273,10 @@ when passed a service with an already-registered name."
   (with-shepherd-action name ('stop) result
     result))
 
+(define (restart-service name)
+  (with-shepherd-action name ('restart) result
+    result))
+
 ;; Local Variables:
 ;; eval: (put 'alist-let* 'scheme-indent-function 2)
 ;; eval: (put 'with-shepherd 'scheme-indent-function 1)