services: keepalived: Add ‘shepherd-requirement’ field.

* gnu/services/networking.scm (<keepalived-configuration>)[shepherd-requirement]:
New field.
(keepalived-shepherd-service): Honor it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Daniel Lakeland 2025-09-05 12:10:45 -07:00 committed by Ludovic Courtès
parent 3512a3f318
commit b05fc57386
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -3003,15 +3003,17 @@ of the IPFS peer-to-peer storage network.")))
(keepalived keepalived-configuration-keepalived ;file-like
(default keepalived))
(config-file keepalived-configuration-config-file ;file-like
(default #f)))
(default #f))
(shepherd-requirement keepalived-configuration-shepherd-requirement
(default '(networking user-processes))))
(define (keepalived-shepherd-service config)
(match-record config <keepalived-configuration>
(keepalived config-file)
(keepalived config-file shepherd-requirement)
(list (shepherd-service
(provision '(keepalived))
(documentation "Run keepalived.")
(requirement '(loopback))
(requirement shepherd-requirement)
(start #~(make-forkexec-constructor
(list (string-append #$keepalived "/sbin/keepalived")
"--dont-fork" "--log-console" "--log-detail"