[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/12: services: certbot: Support registration without email.
From: |
guix-commits |
Subject: |
09/12: services: certbot: Support registration without email. |
Date: |
Sun, 13 Sep 2020 17:35:54 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 11a962e6536d59b8c5b24880fbb19550242ffa04
Author: Timotej Lazar <timotej.lazar@araneo.si>
AuthorDate: Fri Sep 11 13:55:55 2020 +0200
services: certbot: Support registration without email.
* gnu/services/certbot.scm (certbot-configuration): Add default for the
email option.
(certbot-command): Pass email for registration only when specified.
* doc/guix.texi (Certificate Services): "mandatory"→"optional" email.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
doc/guix.texi | 7 ++++---
gnu/services/certbot.scm | 11 ++++++++---
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index a6e14ea..5e4bfd8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -22478,9 +22478,10 @@ A list of @code{certificates-configuration}s for which
to generate
certificates and request signatures. Each certificate has a @code{name}
and several @code{domains}.
-@item @code{email}
-Mandatory email used for registration, recovery contact, and important
-account notifications.
+@item @code{email} (default: @code{#f})
+Optional email address used for registration and recovery contact.
+Setting this is encouraged as it allows you to receive important
+notifications about the account and issued certificates.
@item @code{server} (default: @code{#f})
Optional URL of ACME server. Setting this overrides certbot's default,
diff --git a/gnu/services/certbot.scm b/gnu/services/certbot.scm
index 5643340..1c67ff6 100644
--- a/gnu/services/certbot.scm
+++ b/gnu/services/certbot.scm
@@ -71,7 +71,8 @@
(default "/var/www"))
(certificates certbot-configuration-certificates
(default '()))
- (email certbot-configuration-email)
+ (email certbot-configuration-email
+ (default #f))
(server certbot-configuration-server
(default #f))
(rsa-key-size certbot-configuration-rsa-key-size
@@ -99,12 +100,14 @@
(if challenge
(append
(list name certbot "certonly" "-n" "--agree-tos"
- "-m" email
"--manual"
(string-append "--preferred-challenges=" challenge)
"--cert-name" name
"--manual-public-ip-logging-ok"
"-d" (string-join domains ","))
+ (if email
+ `("--email" ,email)
+ '("--register-unsafely-without-email"))
(if server `("--server" ,server) '())
(if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())
(if authentication-hook
@@ -114,10 +117,12 @@
(if deploy-hook `("--deploy-hook" ,deploy-hook) '()))
(append
(list name certbot "certonly" "-n" "--agree-tos"
- "-m" email
"--webroot" "-w" webroot
"--cert-name" name
"-d" (string-join domains ","))
+ (if email
+ `("--email" ,email)
+ '("--register-unsafely-without-email"))
(if server `("--server" ,server) '())
(if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())
(if deploy-hook `("--deploy-hook" ,deploy-hook) '()))))))
- 01/12: gnu: libcyaml: Update to 1.1.0., (continued)
- 01/12: gnu: libcyaml: Update to 1.1.0., guix-commits, 2020/09/13
- 02/12: gnu: libaudec: Update to 0.2.3., guix-commits, 2020/09/13
- 03/12: gnu: Add meson 0.55.1., guix-commits, 2020/09/13
- 05/12: gnu: libgccjit: Reword synopsis and description., guix-commits, 2020/09/13
- 06/12: gnu: gccgo: Reword synopsis and description., guix-commits, 2020/09/13
- 08/12: gnu: fmt: Update to 7.0.3., guix-commits, 2020/09/13
- 10/12: gnu: emacs-djvu: Add needed inputs, guix-commits, 2020/09/13
- 11/12: gnu: glade: Add catalog and module search paths., guix-commits, 2020/09/13
- 07/12: gnu: gcc-toolchain: Reword description., guix-commits, 2020/09/13
- 04/12: gnu: zrythm: Update to 0.8.911., guix-commits, 2020/09/13
- 09/12: services: certbot: Support registration without email.,
guix-commits <=
- 12/12: gnu: libhandy: Enable glade_catalog., guix-commits, 2020/09/13