mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 11:23:26 +01:00
Merge pull request #1897
44a5b038
create a foreground non-interactive mode (Noah Watkins)
This commit is contained in:
commit
4b34531307
@ -63,6 +63,13 @@ namespace daemonize
|
||||
return t_daemon{vm};
|
||||
}
|
||||
|
||||
bool t_executor::run_non_interactive(
|
||||
boost::program_options::variables_map const & vm
|
||||
)
|
||||
{
|
||||
return t_daemon{vm}.run(false);
|
||||
}
|
||||
|
||||
bool t_executor::run_interactive(
|
||||
boost::program_options::variables_map const & vm
|
||||
)
|
||||
|
@ -56,6 +56,10 @@ namespace daemonize
|
||||
boost::program_options::variables_map const & vm
|
||||
);
|
||||
|
||||
bool run_non_interactive(
|
||||
boost::program_options::variables_map const & vm
|
||||
);
|
||||
|
||||
bool run_interactive(
|
||||
boost::program_options::variables_map const & vm
|
||||
);
|
||||
|
@ -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…
Reference in New Issue
Block a user