From 3a24e5649ee39610884f472d32bd4f9d8c78b9c3 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Wed, 29 May 2024 22:08:19 +0200 Subject: [PATCH] Don't automatically create directory at domain.store_dir_path --- src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) 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(