Renew a specific domain certificate or all domains
(&self, domain: Option<&str>, force: bool)
| 338 | |
| 339 | /// Renew a specific domain certificate or all domains |
| 340 | pub(crate) async fn renew_cert(&self, domain: Option<&str>, force: bool) -> Result<bool> { |
| 341 | match domain { |
| 342 | Some(domain) => self |
| 343 | .certbot |
| 344 | .try_renew(domain, force) |
| 345 | .await |
| 346 | .context("failed to renew cert"), |
| 347 | None => { |
| 348 | // Renew all domains |
| 349 | self.certbot |
| 350 | .try_renew_all() |
| 351 | .await |
| 352 | .context("failed to renew all certs")?; |
| 353 | Ok(true) |
| 354 | } |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | /// Get ACME info for all managed domains (or a specific domain) |
| 359 | pub(crate) fn acme_info(&self, domain: Option<&str>) -> Result<AcmeInfoResponse> { |
no test coverage detected