aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acme.toml33
-rw-r--r--cmd/acme/config.go24
2 files changed, 36 insertions, 21 deletions
diff --git a/acme.toml b/acme.toml
index 9791fb0..80412c7 100644
--- a/acme.toml
+++ b/acme.toml
@@ -1,18 +1,25 @@
-[[account]]
+[provider.lev1]
+directory = "https://acme-v01.api.letsencrypt.org/directory"
+
+[provider.les]
+directory = "https://acme-staging.api.letsencrypt.org/directory"
+
+[account.example]
mail = "another@example.com"
key = "/etc/acme.key"
-provider = "https://acme-staging.api.letsencrypt.org/directory"
+provider = "les"
-[[want]]
-domains = [ "www.example.com", "example.com" ]
-cert = "/etc/certs/www_example_com.pem"
-key = "/etc/private/www_example_com.key"
-# webroot = /var/www/htdocs
+[desire."www.example.com"]
+altnames = [ "www.example.com", "example.com" ]
+key = "/etc/ssl/private/www_example_com.key"
+cert = "/etc/ssl/certs/www_example_com.pem"
+webroot = "/var/www/htdocs"
+account = "example"
+gracetime = "1 week"
+hook = "nginx"
-[[want]]
-domains = [ "www.example.net", "example.net" ]
-cert = "/etc/certs/www_example_net.pem"
-key = "/etc/private/www_example_net.key"
-
-[[hook]]
+[hook.nginx]
cmd = "sudo service nginx reload"
+
+[hook.dovecot]
+cmd = "sudo service dovecot reload"
diff --git a/cmd/acme/config.go b/cmd/acme/config.go
index 46305d6..cbde37a 100644
--- a/cmd/acme/config.go
+++ b/cmd/acme/config.go
@@ -7,9 +7,14 @@ import (
)
type Config struct {
- Account []Account
- Want []Want
- Hook []Hook
+ Provider map[string]Provider
+ Account map[string]Account
+ Desire map[string]Desire
+ Hook map[string]Hook
+}
+
+type Provider struct {
+ Directory string
}
type Account struct {
@@ -18,11 +23,14 @@ type Account struct {
Provider string
}
-type Want struct {
- Domains []string
- Cert string
- Key string
- Webroot string
+type Desire struct {
+ Altnames []string
+ Key string
+ Cert string
+ Webroot string
+ Account string
+ Gracetime string
+ Hook string
}
type Hook struct {