Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does -c, --config <FILE> do? #453

Open
RorinL opened this issue Aug 15, 2024 · 1 comment
Open

What does -c, --config <FILE> do? #453

RorinL opened this issue Aug 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@RorinL
Copy link

RorinL commented Aug 15, 2024

I executed "./hbbs -h" and saw "-c"
Is this started by using a configuration file? How do I use this? I searched but can't seem to find anything about the function of this command?

In addition to specifying the ports of hbbr and hbbs, can I specify ports 21118, 21119, 21115 as other ports?

@RorinL RorinL added the bug Something isn't working label Aug 15, 2024
@moeshin
Copy link

moeshin commented Nov 27, 2024

if let Some(config) = matches.value_of("config") {
if let Ok(v) = Ini::load_from_file(config) {
if let Some(section) = v.section(None::<String>) {
section
.iter()
.for_each(|(k, v)| std::env::set_var(arg_name(k), v));
}
}
}

Config file is INI. Finally, it will be set to env var.
The same is true for command line parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants