mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 16:27:39 +00:00
Merge pull request #5480
7af49ef0
daemonizer: add --non-interactive for windows (moneromooo-monero)
This commit is contained in:
commit
2aa7fbd1d6
1 changed files with 9 additions and 1 deletions
|
@ -61,6 +61,10 @@ namespace daemonizer
|
||||||
"run-as-service"
|
"run-as-service"
|
||||||
, "Hidden -- true if running as windows service"
|
, "Hidden -- true if running as windows service"
|
||||||
};
|
};
|
||||||
|
const command_line::arg_descriptor<bool> arg_non_interactive = {
|
||||||
|
"non-interactive"
|
||||||
|
, "Run non-interactive"
|
||||||
|
};
|
||||||
|
|
||||||
std::string get_argument_string(int argc, char const * argv[])
|
std::string get_argument_string(int argc, char const * argv[])
|
||||||
{
|
{
|
||||||
|
@ -83,6 +87,7 @@ namespace daemonizer
|
||||||
command_line::add_arg(normal_options, arg_start_service);
|
command_line::add_arg(normal_options, arg_start_service);
|
||||||
command_line::add_arg(normal_options, arg_stop_service);
|
command_line::add_arg(normal_options, arg_stop_service);
|
||||||
command_line::add_arg(hidden_options, arg_is_service);
|
command_line::add_arg(hidden_options, arg_is_service);
|
||||||
|
command_line::add_arg(hidden_options, arg_non_interactive);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline boost::filesystem::path get_default_data_dir()
|
inline boost::filesystem::path get_default_data_dir()
|
||||||
|
@ -177,6 +182,9 @@ namespace daemonizer
|
||||||
else // interactive
|
else // interactive
|
||||||
{
|
{
|
||||||
//LOG_PRINT_L0("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL);
|
//LOG_PRINT_L0("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL);
|
||||||
|
if (command_line::has_arg(vm, arg_non_interactive))
|
||||||
|
return executor.run_non_interactive(vm);
|
||||||
|
else
|
||||||
return executor.run_interactive(vm);
|
return executor.run_interactive(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue