mirror of
https://github.com/monero-project/monero.git
synced 2025-07-31 13:18:44 -04:00
create a foreground non-interactive mode
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
This commit is contained in:
parent
e960be55ed
commit
44a5b03841
3 changed files with 20 additions and 0 deletions
|
@ -43,6 +43,10 @@ namespace daemonizer
|
|||
"detach"
|
||||
, "Run as daemon"
|
||||
};
|
||||
const command_line::arg_descriptor<bool> arg_non_interactive = {
|
||||
"non-interactive"
|
||||
, "Run non-interactive"
|
||||
};
|
||||
}
|
||||
|
||||
inline void init_options(
|
||||
|
@ -51,6 +55,7 @@ namespace daemonizer
|
|||
)
|
||||
{
|
||||
command_line::add_arg(normal_options, arg_detach);
|
||||
command_line::add_arg(normal_options, arg_non_interactive);
|
||||
}
|
||||
|
||||
inline boost::filesystem::path get_default_data_dir()
|
||||
|
@ -79,6 +84,10 @@ namespace daemonizer
|
|||
auto daemon = executor.create_daemon(vm);
|
||||
return daemon.run();
|
||||
}
|
||||
else if (command_line::has_arg(vm, arg_non_interactive))
|
||||
{
|
||||
return executor.run_non_interactive(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
//LOG_PRINT_L0("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue