mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
services: ngircd: Allow specifying Shepherd requirements.
* gnu/services/messaging.scm (ngircd-configuration) [shepherd-requirement]: New field. * gnu/services/messaging.scm (ngircd-shepherd-service) [requirement]: Use it. * doc/guix.texi (Messaging Services): Update doc. Change-Id: I8164c132ca25830885005d0e8f55554047c84a95
This commit is contained in:
parent
57768a7566
commit
f47ff4fcce
2 changed files with 10 additions and 2 deletions
|
@ -30407,6 +30407,9 @@ The @code{ngircd} package to use.
|
||||||
@item @code{debug?} (default: @code{#f}) (type: boolean)
|
@item @code{debug?} (default: @code{#f}) (type: boolean)
|
||||||
Turn on debugging messages.
|
Turn on debugging messages.
|
||||||
|
|
||||||
|
@item @code{shepherd-requirement} (default: @code{(user-processes)}) (type: list-of-symbols)
|
||||||
|
Shepherd requirements the service should depend on.
|
||||||
|
|
||||||
@item @code{global} (type: ngircd-global)
|
@item @code{global} (type: ngircd-global)
|
||||||
A ngircd-global record object used to specify global options.
|
A ngircd-global record object used to specify global options.
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
ngircd-configuration?
|
ngircd-configuration?
|
||||||
ngircd-configuration-ngircd
|
ngircd-configuration-ngircd
|
||||||
ngircd-configuration-debug?
|
ngircd-configuration-debug?
|
||||||
|
ngircd-configuration-shepherd-requirement
|
||||||
ngircd-configuration-global
|
ngircd-configuration-global
|
||||||
ngircd-configuration-limits
|
ngircd-configuration-limits
|
||||||
ngircd-configuration-options
|
ngircd-configuration-options
|
||||||
|
@ -1415,6 +1416,10 @@ for different users. Refer to @samp{man 5 ngircd.conf} for more details.")
|
||||||
(boolean #f)
|
(boolean #f)
|
||||||
"Turn on debugging messages."
|
"Turn on debugging messages."
|
||||||
(serializer empty-serializer))
|
(serializer empty-serializer))
|
||||||
|
(shepherd-requirement
|
||||||
|
(list-of-symbols '(user-processes))
|
||||||
|
"Shepherd requirements the service should depend on."
|
||||||
|
(serializer empty-serializer))
|
||||||
(global
|
(global
|
||||||
;; Always use a ngircd-global default to ensure the default addresses
|
;; Always use a ngircd-global default to ensure the default addresses
|
||||||
;; listened to are known (used to compute the socket endpoints).
|
;; listened to are known (used to compute the socket endpoints).
|
||||||
|
@ -1583,7 +1588,7 @@ wrapper for the 'ngircd' command."
|
||||||
|
|
||||||
(define (ngircd-shepherd-service config)
|
(define (ngircd-shepherd-service config)
|
||||||
(match-record config <ngircd-configuration>
|
(match-record config <ngircd-configuration>
|
||||||
(ngircd debug? global ssl)
|
(ngircd debug? global shepherd-requirement ssl)
|
||||||
(let* ((ngircd.conf (serialize-ngircd-configuration config))
|
(let* ((ngircd.conf (serialize-ngircd-configuration config))
|
||||||
(ngircd (file-append ngircd "/sbin/ngircd"))
|
(ngircd (file-append ngircd "/sbin/ngircd"))
|
||||||
(addresses (ngircd-global-listen global))
|
(addresses (ngircd-global-listen global))
|
||||||
|
@ -1594,7 +1599,7 @@ wrapper for the 'ngircd' command."
|
||||||
ports*)))
|
ports*)))
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(provision '(ngircd))
|
(provision '(ngircd))
|
||||||
(requirement '(user-processes networking syslogd))
|
(requirement shepherd-requirement)
|
||||||
(modules (cons '(srfi srfi-1) %default-modules))
|
(modules (cons '(srfi srfi-1) %default-modules))
|
||||||
(actions (list (shepherd-configuration-action ngircd.conf)))
|
(actions (list (shepherd-configuration-action ngircd.conf)))
|
||||||
(start #~(make-systemd-constructor
|
(start #~(make-systemd-constructor
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue