summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/config.rs5
-rw-r--r--src/main.rs1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index ef3d708..7254887 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -34,6 +34,11 @@ impl Config {
let file = File::open(path.as_ref()).map_err(ConfigError::IoReadingConfig)?;
let mut config: Config = serde_json::from_reader(file)?;
+ if config.secret_path.is_relative() {
+ eprintln!("warning: `secret_path` in configuration is a relative path.\
+ This will be resolved relative to the server's CWD at runtime,\
+ which is most likely not what you want!");
+ }
config.secret = fs::read_to_string(&config.secret_path)
.map_err(ConfigError::IoReadingSecret)?;
diff --git a/src/main.rs b/src/main.rs
index fefbca7..c67586d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -68,6 +68,7 @@ fn get_listener_from_systemd() -> io::Result<TokioUnixListener> {
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let config = load_config();
+ println!("Using config: {:?}", config);
let listener = get_listener_from_systemd()?;