diff --git a/root/etc/e-smith/db/configuration/defaults/letsencrypt/Uri b/root/etc/e-smith/db/configuration/defaults/letsencrypt/Uri new file mode 100644 index 0000000..dcd5906 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/letsencrypt/Uri @@ -0,0 +1 @@ +staging diff --git a/root/etc/e-smith/templates/etc/letsencrypt.sh/config.sh/10Uri b/root/etc/e-smith/templates/etc/letsencrypt.sh/config.sh/10Uri new file mode 100644 index 0000000..8fa1cf5 --- /dev/null +++ b/root/etc/e-smith/templates/etc/letsencrypt.sh/config.sh/10Uri @@ -0,0 +1,14 @@ +{ + +my $uri = $letsencrypt{'Uri'} || 'staging'; +if ($uri =~ m{^https?://}){ + $OUT .= "CA=$uri\n"; +} +elsif ($uri =~ m/^(test(ing)?)|staging$/){ + $OUT .= "CA=https://acme-staging.api.letsencrypt.org/directory\n"; +} +elsif ($uri =~ m/^prod/){ + $OUT .= "CA=https://acme-v01.api.letsencrypt.org/directory\n"; +} + +}