aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralmalh <almalh@proton.me>2023-03-10 20:41:56 -0500
committeralmalh <almalh@proton.me>2023-04-15 18:28:12 -0400
commit87e2a643279a19191d84bca0a43a4c7a96840bfc (patch)
tree91b43c45d57771a18ee6e83f0e266ec472dfee76
parentMerge pull request #8737 (diff)
downloadmonero-87e2a643279a19191d84bca0a43a4c7a96840bfc.tar.xz
Allow option 'non-interactive' in monerod config file
-rw-r--r--src/daemon/main.cpp1
-rw-r--r--src/daemonizer/daemonizer.h5
-rw-r--r--src/daemonizer/posix_daemonizer.inl5
-rw-r--r--src/daemonizer/windows_daemonizer.inl6
-rw-r--r--src/wallet/wallet_rpc_server.cpp1
5 files changed, 7 insertions, 11 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index 3d90e0855..09ae0633e 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -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_pub);
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);
daemonize::t_executor::init_options(core_settings);
diff --git a/src/daemonizer/daemonizer.h b/src/daemonizer/daemonizer.h
index fa19c28b0..9bd7191a4 100644
--- a/src/daemonizer/daemonizer.h
+++ b/src/daemonizer/daemonizer.h
@@ -57,6 +57,11 @@ namespace daemonizer
, T_executor && executor // universal ref
, boost::program_options::variables_map const & vm
);
+
+ const command_line::arg_descriptor<bool> arg_non_interactive = {
+ "non-interactive"
+ , "Run non-interactive"
+ };
}
#ifdef WIN32
diff --git a/src/daemonizer/posix_daemonizer.inl b/src/daemonizer/posix_daemonizer.inl
index bd2741039..1942bc220 100644
--- a/src/daemonizer/posix_daemonizer.inl
+++ b/src/daemonizer/posix_daemonizer.inl
@@ -47,10 +47,6 @@ namespace daemonizer
"pidfile"
, "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(
@@ -60,7 +56,6 @@ namespace daemonizer
{
command_line::add_arg(normal_options, arg_detach);
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()
diff --git a/src/daemonizer/windows_daemonizer.inl b/src/daemonizer/windows_daemonizer.inl
index a0086408f..364c0ab44 100644
--- a/src/daemonizer/windows_daemonizer.inl
+++ b/src/daemonizer/windows_daemonizer.inl
@@ -61,11 +61,6 @@ namespace daemonizer
"run-as-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 result = "";
@@ -87,7 +82,6 @@ namespace daemonizer
command_line::add_arg(normal_options, arg_start_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_non_interactive);
}
inline boost::filesystem::path get_default_data_dir()
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index cecf24289..15299a33c 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -4708,6 +4708,7 @@ int main(int argc, char** argv) {
command_line::add_arg(desc_params, arg_prompt_for_password);
command_line::add_arg(desc_params, arg_rpc_client_secret_key);
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);
desc_params.add(hidden_options);