services: herd: Add restart-service.

* gnu/services/herd.scm (restart-service): New exported procedure.
This commit is contained in:
Mathieu Othacehe 2020-02-27 16:42:36 +01:00
parent 1e8fef19b6
commit 8f5a0a97b1
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; 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. ;;; This file is part of GNU Guix.
;;; ;;;
@ -55,7 +55,8 @@ (define-module (gnu services herd)
load-services load-services
load-services/safe load-services/safe
start-service start-service
stop-service)) stop-service
restart-service))
;;; Commentary: ;;; Commentary:
;;; ;;;
@ -272,6 +273,10 @@ (define (stop-service name)
(with-shepherd-action name ('stop) result (with-shepherd-action name ('stop) result
result)) result))
(define (restart-service name)
(with-shepherd-action name ('restart) result
result))
;; Local Variables: ;; Local Variables:
;; eval: (put 'alist-let* 'scheme-indent-function 2) ;; eval: (put 'alist-let* 'scheme-indent-function 2)
;; eval: (put 'with-shepherd 'scheme-indent-function 1) ;; eval: (put 'with-shepherd 'scheme-indent-function 1)