[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30459] [PATCH 10/11] services: certbot: Add verbosity.
From: |
Clément Lassieur |
Subject: |
[bug#30459] [PATCH 10/11] services: certbot: Add verbosity. |
Date: |
Wed, 14 Feb 2018 22:35:03 +0100 |
The certificate name wasn't displayed if it wasn't being renewed.
* gnu/services/certbot.scm (certbot-command): Print certificate name before
running the associated command.
---
gnu/services/certbot.scm | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/gnu/services/certbot.scm b/gnu/services/certbot.scm
index 51f5d719a..f90e4f04b 100644
--- a/gnu/services/certbot.scm
+++ b/gnu/services/certbot.scm
@@ -78,22 +78,28 @@
(commands
(map
(match-lambda
- (($ <certificate-configuration> name domains)
- (append
- (list certbot "certonly" "-n" "--agree-tos"
- "-m" email
- "--webroot" "-w" webroot
- "--cert-name" (or name (car domains))
- "-d" (string-join domains ","))
- (if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '()))))
+ (($ <certificate-configuration> custom-name domains)
+ (let ((name (or custom-name (car domains))))
+ (append
+ (list name certbot "certonly" "-n" "--agree-tos"
+ "-m" email
+ "--webroot" "-w" webroot
+ "--cert-name" name
+ "-d" (string-join domains ","))
+ (if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())))))
certificates)))
(program-file
"certbot-command"
- #~(let ((code 0))
- (for-each
- (lambda (command)
- (set! code (or (apply system* command) code)))
- '#$commands) code))))))
+ #~(begin
+ (use-modules (ice-9 match))
+ (let ((code 0))
+ (for-each
+ (match-lambda
+ ((name . command)
+ (begin
+ (format #t "Acquiring or renewing certificate: ~a~%" name)
+ (set! code (or (apply system* command) code)))))
+ '#$commands) code)))))))
(define (certbot-renewal-jobs config)
(list
--
2.16.1
- [bug#30459] [PATCH 06/11] services: certbot: Get certbot to run non-interactively., (continued)
[bug#30459] [PATCH 02/11] services: certbot: Run certbot twice a day at a random minute., Clément Lassieur, 2018/02/14
[bug#30459] [PATCH 07/11] services: certbot: Associate one certificate with several domains., Clément Lassieur, 2018/02/14
[bug#30459] [PATCH 04/11] services: certbot: Rename 'host' to 'domain'., Clément Lassieur, 2018/02/14
[bug#30459] [PATCH 03/11] services: certbot: Fix indentation., Clément Lassieur, 2018/02/14
[bug#30459] [PATCH 09/11] services: certbot: Allow to set RSA key size., Clément Lassieur, 2018/02/14
[bug#30459] [PATCH 11/11] services: certbot: Allow to set a deploy hook., Clément Lassieur, 2018/02/14
[bug#30459] [PATCH 10/11] services: certbot: Add verbosity.,
Clément Lassieur <=