Browse Source

Add the PID file name in the error message

Rel #24
pull/39/head
Rodolphe Breard 4 years ago
parent
commit
e17e6d1174
  1. 4
      acme_common/src/lib.rs

4
acme_common/src/lib.rs

@ -14,7 +14,7 @@ macro_rules! exit_match {
match $e {
Ok(_) => {}
Err(e) => {
eprintln!("Error: {}", e);
log::error!("Error: {}", e);
std::process::exit(3);
}
}
@ -47,7 +47,7 @@ pub fn init_server(foreground: bool, pid_file: Option<&str>, default_pid_file: &
let daemonize = Daemonize::new().pid_file(pid_file.unwrap_or(default_pid_file));
exit_match!(daemonize.start());
} else if let Some(f) = pid_file {
exit_match!(write_pid_file(f));
exit_match!(write_pid_file(f).map_err(|e| e.prefix(f)));
}
}

Loading…
Cancel
Save