mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
services: certbot: Allow to set a deploy hook.
* doc/guix.texi (Certificate Services): Document it. * gnu/services/certbot.scm (<certificate-configuration>, certbot-command): Add it.
This commit is contained in:
parent
e216c797f7
commit
fece75fe35
2 changed files with 27 additions and 5 deletions
|
@ -48,7 +48,9 @@
|
|||
(name certificate-configuration-name
|
||||
(default #f))
|
||||
(domains certificate-configuration-domains
|
||||
(default '())))
|
||||
(default '()))
|
||||
(deploy-hook certificate-configuration-deploy-hook
|
||||
(default #f)))
|
||||
|
||||
(define-record-type* <certbot-configuration>
|
||||
certbot-configuration make-certbot-configuration
|
||||
|
@ -78,7 +80,8 @@
|
|||
(commands
|
||||
(map
|
||||
(match-lambda
|
||||
(($ <certificate-configuration> custom-name domains)
|
||||
(($ <certificate-configuration> custom-name domains
|
||||
deploy-hook)
|
||||
(let ((name (or custom-name (car domains))))
|
||||
(append
|
||||
(list name certbot "certonly" "-n" "--agree-tos"
|
||||
|
@ -86,7 +89,8 @@
|
|||
"--webroot" "-w" webroot
|
||||
"--cert-name" name
|
||||
"-d" (string-join domains ","))
|
||||
(if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())))))
|
||||
(if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())
|
||||
(if deploy-hook `("--deploy-hook" ,deploy-hook) '())))))
|
||||
certificates)))
|
||||
(program-file
|
||||
"certbot-command"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue