server: Load config for both run and mail
This commit is contained in:
committed by
nitnelave
parent
77ced7ea43
commit
1d54ca8040
@@ -84,14 +84,13 @@ async fn run_server(config: Configuration) -> Result<()> {
|
||||
}
|
||||
|
||||
fn run_server_command(opts: RunOpts) -> Result<()> {
|
||||
let config = infra::configuration::init(opts.clone())?;
|
||||
infra::logging::init(config.clone())?;
|
||||
debug!("CLI: {:#?}", &opts);
|
||||
|
||||
let config = infra::configuration::init(opts)?;
|
||||
infra::logging::init(&config)?;
|
||||
|
||||
info!("Starting LLDAP....");
|
||||
|
||||
debug!("CLI: {:#?}", opts);
|
||||
debug!("Configuration: {:#?}", config);
|
||||
|
||||
actix::run(
|
||||
run_server(config).unwrap_or_else(|e| error!("Could not bring up the servers: {:#}", e)),
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user