diff options
author | Alex Auvolat <alex@adnab.me> | 2021-12-08 12:16:28 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-12-08 12:16:28 +0100 |
commit | 090e58ca7cb6df7eb0e2a0c964ba0e3a22cfe6db (patch) | |
tree | d95904ffbf68a71c1211e49ebb4b5ee0ebc4e675 /src/main.rs | |
parent | 8a4778c6bc28403f85a68c420709d2758c7378c4 (diff) | |
download | tricot-090e58ca7cb6df7eb0e2a0c964ba0e3a22cfe6db.tar.gz tricot-090e58ca7cb6df7eb0e2a0c964ba0e3a22cfe6db.zip |
Let's encrypt email address as parameter
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 481fe35..bea09bd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,6 +52,13 @@ struct Opt { default_value = "0.0.0.0:443" )] pub https_bind_addr: SocketAddr, + + /// E-mail address for Let's Encrypt certificate requests + #[structopt( + long = "letsencrypt-email", + env = "TRICOT_LETSENCRYPT_EMAIL", + )] + pub letsencrypt_email: String, } #[tokio::main(flavor = "multi_thread", worker_threads = 10)] @@ -68,7 +75,7 @@ async fn main() { let consul = consul::Consul::new(&opt.consul_addr, &opt.consul_kv_prefix, &opt.node_name); let mut rx_proxy_config = proxy_config::spawn_proxy_config_task(consul.clone()); - let cert_store = cert_store::CertStore::new(consul.clone(), rx_proxy_config.clone()); + let cert_store = cert_store::CertStore::new(consul.clone(), rx_proxy_config.clone(), opt.letsencrypt_email.clone()); tokio::spawn(cert_store.clone().watch_proxy_config()); tokio::spawn(http::serve_http(opt.http_bind_addr, consul.clone())); |