mirror of
https://github.com/monero-project/monero.git
synced 2025-01-28 18:56:31 +02:00
Add daemon command line arguments
This commit is contained in:
parent
0d5de1dc84
commit
07b06239e9
@ -12,6 +12,8 @@
|
|||||||
using namespace epee;
|
using namespace epee;
|
||||||
|
|
||||||
#include <boost/program_options.hpp>
|
#include <boost/program_options.hpp>
|
||||||
|
#include <initializer_list>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "crypto/hash.h"
|
#include "crypto/hash.h"
|
||||||
#include "console_handler.h"
|
#include "console_handler.h"
|
||||||
@ -37,8 +39,11 @@ namespace
|
|||||||
const command_line::arg_descriptor<std::string> arg_log_file = {"log-file", "", ""};
|
const command_line::arg_descriptor<std::string> arg_log_file = {"log-file", "", ""};
|
||||||
const command_line::arg_descriptor<int> arg_log_level = {"log-level", "", LOG_LEVEL_0};
|
const command_line::arg_descriptor<int> arg_log_level = {"log-level", "", LOG_LEVEL_0};
|
||||||
const command_line::arg_descriptor<bool> arg_console = {"no-console", "Disable daemon console commands"};
|
const command_line::arg_descriptor<bool> arg_console = {"no-console", "Disable daemon console commands"};
|
||||||
const command_line::arg_descriptor<bool> arg_start_daemon = {"start-daemon", "Run as daemon", false};
|
|
||||||
const command_line::arg_descriptor<bool> arg_stop_daemon = {"stop-daemon", "Stop running daemon", false};
|
const command_line::arg_descriptor<bool> arg_start_daemon = {"start-daemon", "Run as daemon"};
|
||||||
|
const command_line::arg_descriptor<bool> arg_stop_daemon = {"stop-daemon", "Stop running daemon"};
|
||||||
|
const command_line::arg_descriptor<bool> arg_help_daemon = {"daemon-help", "Display daemon command help"};
|
||||||
|
const command_line::arg_descriptor<std::vector<std::string>> arg_daemon_command = {"send-command", "Send a command string to the running daemon"};
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
@ -77,6 +82,8 @@ int main(int argc, char* argv[])
|
|||||||
po::options_description daemon_commands_spec("Daemon Commands");
|
po::options_description daemon_commands_spec("Daemon Commands");
|
||||||
command_line::add_arg(daemon_commands_spec, arg_start_daemon);
|
command_line::add_arg(daemon_commands_spec, arg_start_daemon);
|
||||||
command_line::add_arg(daemon_commands_spec, arg_stop_daemon);
|
command_line::add_arg(daemon_commands_spec, arg_stop_daemon);
|
||||||
|
command_line::add_arg(daemon_commands_spec, arg_help_daemon);
|
||||||
|
command_line::add_arg(daemon_commands_spec, arg_daemon_command);
|
||||||
|
|
||||||
// Core Options
|
// Core Options
|
||||||
command_line::add_arg(core_settings_spec, arg_log_file, default_log_file_abs.string());
|
command_line::add_arg(core_settings_spec, arg_log_file, default_log_file_abs.string());
|
||||||
|
Loading…
Reference in New Issue
Block a user