diff --git a/src/bin/ptth_server.rs b/src/bin/ptth_server.rs index 9013f10..e3c0d70 100644 --- a/src/bin/ptth_server.rs +++ b/src/bin/ptth_server.rs @@ -9,13 +9,18 @@ use tracing::debug; #[derive (Debug, StructOpt)] struct Opt { + //#[structopt (long)] + //file_server_root: Option , + #[structopt (long)] - file_server_root: Option , + config_path: Option , } fn main () -> Result <(), Box > { + let opt = Opt::from_args (); + tracing_subscriber::fmt::init (); - let path = PathBuf::from ("./config/ptth_server.toml"); + let path = opt.config_path.unwrap_or_else (|| PathBuf::from ("./config/ptth_server.toml")); let config_file: ptth::server::ConfigFile = ptth::load_toml::load (&path); let mut rt = if false {