Skip to content

Commit

Permalink
Merge pull request #32 from holochain/patch-1
Browse files Browse the repository at this point in the history
Patch 1
  • Loading branch information
neonphog authored Apr 30, 2021
2 parents 2998dd3 + c9d8dfa commit 3bd7105
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 20 additions & 2 deletions crates/lair_keystore/src/bin/lair-keystore/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,33 @@
use structopt::StructOpt;
use tracing::*;

static LAIR_KEYSTORE_ABOUT: &str = r#"A secure storage system for Holochain cryptographic keys and secrets.
- one `lair-keystore` per `holochain`
- attaches the secure storage and IPC process
to a directory configurable via command
line options. a sensible platform specific
dir will be used as a default dir (and be
logged when executed)"#;

#[derive(Debug, StructOpt)]
#[structopt(name = "lair-keystore")]
#[structopt(
name = "lair-keystore",
about = LAIR_KEYSTORE_ABOUT
)]
struct Opt {
/// Print out version info and exit.
#[structopt(short, long)]
version: bool,

/// Set the lair data directory.
#[structopt(short = "d", long, env = "LAIR_DIR")]
#[structopt(
short = "d",
long,
env = "LAIR_DIR",
help = "Can be used to override the default keystore
directory to run multiple instances or for other purposes"
)]
lair_dir: Option<std::path::PathBuf>,
}

Expand Down
2 changes: 2 additions & 0 deletions crates/lair_keystore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ pub async fn execute_lair() -> LairResult<()> {

let config = config.build();

println!("#lair-keystore-dir:{:?}#", config.get_root_path());

let internal::pid_check::PidCheckResult { store_file } =
internal::pid_check::pid_check(&config)?;

Expand Down

0 comments on commit 3bd7105

Please sign in to comment.