Don't automatically create directory at domain.store_dir_path

This commit is contained in:
Brian Picciano 2024-05-29 22:08:19 +02:00
parent 2e8ec9ff86
commit 3a24e5649e

View File

@ -94,6 +94,15 @@ async fn main() {
panic!("http is disabled, but is required by external_domains"); 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 origin_store = domani::origin::git::Proxy::new();
let domain_checker = domani::domain::checker::DNSChecker::new( let domain_checker = domani::domain::checker::DNSChecker::new(