From 669c708331da2b58749b2d8973a556f09bddb362 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Tue, 12 Sep 2023 21:46:34 +0200 Subject: [PATCH] Make the Let's Encrypt email configurable Signed-off-by: Denis 'GNUtoo' Carikli --- Makefile.am | 4 +++- configure.ac | 11 ++++++++++- mumble-vm-system.scm.tmpl | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index a4dfb13..a77beb6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,7 +34,9 @@ guix-commit.txt: Makefile sed 's#DOMAIN#$(DOMAIN)#g' $< > $@ %.scm: %.scm.tmpl guix-commit.txt Makefile - sed 's#DOMAIN#$(DOMAIN)#g' $< > $@ + sed \ + "s#DOMAIN#$(DOMAIN)#g ; \ + s#LETSENCRYPT_EMAIL#$(LETSENCRYPT_EMAIL)#g" $< > $@ IMAGE_SOURCE = \ guix-commit.txt \ diff --git a/configure.ac b/configure.ac index 9df10be..d57ceab 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,7 @@ AC_CHECK_PROG([GUIX], [guix], [guix]) AC_CHECK_PROG([SED], [sed], [sed]) AC_SUBST([DOMAIN], []) +AC_SUBST([LETSENCRYPT_EMAIL], []) AC_ARG_WITH([domain], [AS_HELP_STRING([--with-domain=DOMAIN], @@ -31,10 +32,18 @@ AC_ARG_WITH([domain], [DOMAIN=$withval], [DOMAIN=audio.experimental.a-lec.org]) +AC_ARG_WITH([letsencrypt-email], + [AS_HELP_STRING([--with-letsencrypt-email=LETSENCRYPT_EMAIL], [Use + custom email address for Let's Encrypt registration and recovery + contact. (default=cominfra@a-lec.org)])], + [LETSENCRYPT_EMAIL=$withval], + [LETSENCRYPT_EMAIL=cominfra@a-lec.org]) + AC_CONFIG_FILES([Makefile]) AC_OUTPUT echo echo "Configuration options:" echo "======================" -echo "- domain: $DOMAIN" +echo "- Domain: $DOMAIN" +echo "- Let's Encrypt email: $LETSENCRYPT_EMAIL" diff --git a/mumble-vm-system.scm.tmpl b/mumble-vm-system.scm.tmpl index f04162f..07cc312 100644 --- a/mumble-vm-system.scm.tmpl +++ b/mumble-vm-system.scm.tmpl @@ -86,7 +86,7 @@ replicate or contribute to it.") (service certbot-service-type (certbot-configuration - (email "cominfra@a-lec.org") + (email "LETSENCRYPT_EMAIL") (certificates (list (certificate-configuration