mirror of
https://github.com/kanidm/kanidm.git
synced 2025-05-23 01:13:54 +02:00
Version output for 4 unix_int tools (#1408)
This commit is contained in:
parent
3378717d5a
commit
f1c9e92f93
|
@ -28,6 +28,10 @@ async fn main() {
|
|||
if opt.debug {
|
||||
::std::env::set_var("RUST_LOG", "kanidm=debug,kanidm_client=debug");
|
||||
}
|
||||
if opt.version {
|
||||
println!("{}", kanidm_proto::utils::get_version("kanidm_cache_clear"));
|
||||
std::process::exit(0);
|
||||
}
|
||||
sketching::tracing_subscriber::fmt::init();
|
||||
|
||||
debug!("Starting cache invalidate tool ...");
|
||||
|
|
|
@ -28,6 +28,10 @@ async fn main() {
|
|||
if opt.debug {
|
||||
::std::env::set_var("RUST_LOG", "kanidm=debug,kanidm_client=debug");
|
||||
}
|
||||
if opt.version {
|
||||
println!("{}", kanidm_proto::utils::get_version("kanidm_cache_invalidate"));
|
||||
std::process::exit(0);
|
||||
}
|
||||
sketching::tracing_subscriber::fmt::init();
|
||||
|
||||
debug!("Starting cache invalidate tool ...");
|
||||
|
|
|
@ -29,6 +29,10 @@ fn main() {
|
|||
if opt.debug {
|
||||
::std::env::set_var("RUST_LOG", "kanidm=debug,kanidm_client=debug");
|
||||
}
|
||||
if opt.version {
|
||||
println!("{}", kanidm_proto::utils::get_version("kanidm_unixd_status"));
|
||||
std::process::exit(0);
|
||||
}
|
||||
sketching::tracing_subscriber::fmt::init();
|
||||
|
||||
trace!("Starting cache status tool ...");
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
struct CacheClearOpt {
|
||||
#[clap(short, long)]
|
||||
debug: bool,
|
||||
#[clap(short, long, action = clap::ArgAction::SetTrue)]
|
||||
version: bool,
|
||||
#[clap(long)]
|
||||
really: bool,
|
||||
}
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
struct CacheInvalidateOpt {
|
||||
#[clap(short, long)]
|
||||
debug: bool,
|
||||
#[clap(short, long, action = clap::ArgAction::SetTrue)]
|
||||
version: bool,
|
||||
}
|
||||
|
|
|
@ -4,4 +4,6 @@ struct SshAuthorizedOpt {
|
|||
debug: bool,
|
||||
#[clap()]
|
||||
account_id: String,
|
||||
#[clap(short, long, action = clap::ArgAction::SetTrue)]
|
||||
version: bool,
|
||||
}
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
struct UnixdStatusOpt {
|
||||
#[clap(short, long)]
|
||||
debug: bool,
|
||||
#[clap(short, long, action = clap::ArgAction::SetTrue)]
|
||||
version: bool,
|
||||
}
|
||||
|
|
|
@ -30,6 +30,10 @@ async fn main() {
|
|||
if opt.debug {
|
||||
::std::env::set_var("RUST_LOG", "kanidm=debug,kanidm_client=debug");
|
||||
}
|
||||
if opt.version {
|
||||
println!("{}", kanidm_proto::utils::get_version("kanidm_ssh_authorizedkeys"));
|
||||
std::process::exit(0);
|
||||
}
|
||||
sketching::tracing_subscriber::fmt::init();
|
||||
|
||||
debug!("Starting authorized keys tool ...");
|
||||
|
|
|
@ -48,6 +48,7 @@ impl OrcaOpt {
|
|||
OrcaOpt::PreProc(opt) => opt.copt.debug,
|
||||
OrcaOpt::Setup(opt) => opt.copt.debug,
|
||||
OrcaOpt::Run(opt) => opt.copt.debug,
|
||||
OrcaOpt::Version(opt) => opt.debug,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -231,6 +232,10 @@ async fn main() {
|
|||
info!("Orca - the Kanidm Load Testing Utility.");
|
||||
debug!("cli -> {:?}", opt);
|
||||
match opt {
|
||||
OrcaOpt::Version(_opt) => {
|
||||
println!("{}", kanidm_proto::utils::get_version("orca"));
|
||||
std::process::exit(0);
|
||||
}
|
||||
OrcaOpt::TestConnection(opt) => {
|
||||
let _ = conntest(&opt.target, &opt.profile_path).await;
|
||||
}
|
||||
|
|
|
@ -148,4 +148,7 @@ enum OrcaOpt {
|
|||
#[clap(name = "run")]
|
||||
/// Run the load test as defined by the test profile
|
||||
Run(RunOpt),
|
||||
#[clap(name = "version")]
|
||||
/// Print version info and exit
|
||||
Version(CommonOpt)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue