mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Merge pull request #8772
87e2a64
Allow option 'non-interactive' in monerod config file (almalh)
This commit is contained in:
commit
570fd364aa
@ -159,6 +159,7 @@ int main(int argc, char const * argv[])
|
|||||||
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_bind_port);
|
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_bind_port);
|
||||||
command_line::add_arg(core_settings, daemon_args::arg_zmq_pub);
|
command_line::add_arg(core_settings, daemon_args::arg_zmq_pub);
|
||||||
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_disabled);
|
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_disabled);
|
||||||
|
command_line::add_arg(core_settings, daemonizer::arg_non_interactive);
|
||||||
|
|
||||||
daemonizer::init_options(hidden_options, visible_options);
|
daemonizer::init_options(hidden_options, visible_options);
|
||||||
daemonize::t_executor::init_options(core_settings);
|
daemonize::t_executor::init_options(core_settings);
|
||||||
|
@ -57,6 +57,11 @@ namespace daemonizer
|
|||||||
, T_executor && executor // universal ref
|
, T_executor && executor // universal ref
|
||||||
, boost::program_options::variables_map const & vm
|
, boost::program_options::variables_map const & vm
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const command_line::arg_descriptor<bool> arg_non_interactive = {
|
||||||
|
"non-interactive"
|
||||||
|
, "Run non-interactive"
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
@ -47,10 +47,6 @@ namespace daemonizer
|
|||||||
"pidfile"
|
"pidfile"
|
||||||
, "File path to write the daemon's PID to (optional, requires --detach)"
|
, "File path to write the daemon's PID to (optional, requires --detach)"
|
||||||
};
|
};
|
||||||
const command_line::arg_descriptor<bool> arg_non_interactive = {
|
|
||||||
"non-interactive"
|
|
||||||
, "Run non-interactive"
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void init_options(
|
inline void init_options(
|
||||||
@ -60,7 +56,6 @@ namespace daemonizer
|
|||||||
{
|
{
|
||||||
command_line::add_arg(normal_options, arg_detach);
|
command_line::add_arg(normal_options, arg_detach);
|
||||||
command_line::add_arg(normal_options, arg_pidfile);
|
command_line::add_arg(normal_options, arg_pidfile);
|
||||||
command_line::add_arg(normal_options, arg_non_interactive);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline boost::filesystem::path get_default_data_dir()
|
inline boost::filesystem::path get_default_data_dir()
|
||||||
|
@ -61,11 +61,6 @@ 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[])
|
||||||
{
|
{
|
||||||
std::string result = "";
|
std::string result = "";
|
||||||
@ -87,7 +82,6 @@ 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()
|
||||||
|
@ -4698,6 +4698,7 @@ int main(int argc, char** argv) {
|
|||||||
command_line::add_arg(desc_params, arg_wallet_dir);
|
command_line::add_arg(desc_params, arg_wallet_dir);
|
||||||
command_line::add_arg(desc_params, arg_prompt_for_password);
|
command_line::add_arg(desc_params, arg_prompt_for_password);
|
||||||
command_line::add_arg(desc_params, arg_no_initial_sync);
|
command_line::add_arg(desc_params, arg_no_initial_sync);
|
||||||
|
command_line::add_arg(hidden_options, daemonizer::arg_non_interactive);
|
||||||
|
|
||||||
daemonizer::init_options(hidden_options, desc_params);
|
daemonizer::init_options(hidden_options, desc_params);
|
||||||
desc_params.add(hidden_options);
|
desc_params.add(hidden_options);
|
||||||
|
Loading…
Reference in New Issue
Block a user