ACME support for DigitalOcean (closes #1667)
This commit is contained in:
@@ -19,7 +19,7 @@ mail-builder = { version = "0.4" }
|
||||
mail-auth = { version = "0.7.1" }
|
||||
mail-send = { version = "0.5", default-features = false, features = ["cram-md5", "ring", "tls12"] }
|
||||
smtp-proto = { version = "0.1", features = ["rkyv"] }
|
||||
dns-update = { version = "0.1" }
|
||||
dns-update = { version = "0.1.3" }
|
||||
calcard = { version = "0.1.3", features = ["rkyv"] }
|
||||
ahash = { version = "0.8.2", features = ["serde"] }
|
||||
parking_lot = "0.12.1"
|
||||
|
||||
@@ -252,6 +252,26 @@ fn build_dns_updater(config: &mut Config, acme_id: &str) -> Option<DnsUpdater> {
|
||||
})
|
||||
.ok()
|
||||
}
|
||||
"digitalocean" => {
|
||||
let timeout = config
|
||||
.property_or_default(("acme", acme_id, "timeout"), "30s")
|
||||
.unwrap_or_else(|| Duration::from_secs(30));
|
||||
|
||||
DnsUpdater::new_digitalocean(
|
||||
config
|
||||
.value_require(("acme", acme_id, "secret"))?
|
||||
.trim()
|
||||
.to_string(),
|
||||
timeout.into(),
|
||||
)
|
||||
.map_err(|err| {
|
||||
config.new_build_error(
|
||||
("acme", acme_id, "provider"),
|
||||
format!("Failed to create DigitalOcean DNS updater: {err}"),
|
||||
)
|
||||
})
|
||||
.ok()
|
||||
}
|
||||
_ => {
|
||||
config.new_parse_error(("acme", acme_id, "provider"), "Unsupported provider");
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user