services: certbot: Add verbosity.
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.master
parent
a2cb2bbc0b
commit
e216c797f7
|
@ -78,22 +78,28 @@
|
||||||
(commands
|
(commands
|
||||||
(map
|
(map
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <certificate-configuration> name domains)
|
(($ <certificate-configuration> custom-name domains)
|
||||||
|
(let ((name (or custom-name (car domains))))
|
||||||
(append
|
(append
|
||||||
(list certbot "certonly" "-n" "--agree-tos"
|
(list name certbot "certonly" "-n" "--agree-tos"
|
||||||
"-m" email
|
"-m" email
|
||||||
"--webroot" "-w" webroot
|
"--webroot" "-w" webroot
|
||||||
"--cert-name" (or name (car domains))
|
"--cert-name" name
|
||||||
"-d" (string-join domains ","))
|
"-d" (string-join domains ","))
|
||||||
(if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '()))))
|
(if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())))))
|
||||||
certificates)))
|
certificates)))
|
||||||
(program-file
|
(program-file
|
||||||
"certbot-command"
|
"certbot-command"
|
||||||
#~(let ((code 0))
|
#~(begin
|
||||||
|
(use-modules (ice-9 match))
|
||||||
|
(let ((code 0))
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (command)
|
(match-lambda
|
||||||
(set! code (or (apply system* command) code)))
|
((name . command)
|
||||||
'#$commands) code))))))
|
(begin
|
||||||
|
(format #t "Acquiring or renewing certificate: ~a~%" name)
|
||||||
|
(set! code (or (apply system* command) code)))))
|
||||||
|
'#$commands) code)))))))
|
||||||
|
|
||||||
(define (certbot-renewal-jobs config)
|
(define (certbot-renewal-jobs config)
|
||||||
(list
|
(list
|
||||||
|
|
Reference in New Issue