diff --git a/src/main.rs b/src/main.rs index bfa8da6..f233212 100644 --- a/src/main.rs +++ b/src/main.rs @@ -94,6 +94,15 @@ async fn main() { panic!("http is disabled, but is required by external_domains"); } + // Confirm that domain.store_dir_path actually exists. We don't want to automatically create it + // if it doesn't, as that might lead to certs being written somewhere they shouldn't. + if let Err(e) = std::fs::metadata(&config.domain.store_dir_path) { + panic!( + "failed to check if domain.store_dir_path exists at {}: {e}", + config.domain.store_dir_path.display(), + ) + } + let origin_store = domani::origin::git::Proxy::new(); let domain_checker = domani::domain::checker::DNSChecker::new(