Add --help output for "repmgr node service"

Addresses GitHub #329.
This commit is contained in:
Ian Barwick
2017-10-20 16:44:44 +09:00
parent 6852ac82c6
commit a9759cf6ca
3 changed files with 28 additions and 35 deletions

View File

@@ -36,7 +36,6 @@ static bool copy_file(const char *src_file, const char *dest_file);
static void format_archive_dir(PQExpBufferData *archive_dir);
static t_server_action parse_server_action(const char *action);
static void _do_node_service_check(void);
static void _do_node_service_list_actions(t_server_action action);
static void _do_node_status_is_shutdown_cleanly(void);
static void _do_node_archive_config(void);
@@ -1402,14 +1401,6 @@ do_node_service(void)
exit(ERR_BAD_CONFIG);
}
if (runtime_options.check == true)
{
if (action != ACTION_NONE)
log_warning(_("--action not required for --check"));
return _do_node_service_check();
}
if (runtime_options.list_actions == true)
{
return _do_node_service_list_actions(action);
@@ -1479,12 +1470,6 @@ do_node_service(void)
}
static void
_do_node_service_check(void)
{
}
static void
_do_node_service_list_actions(t_server_action action)
{
@@ -2259,4 +2244,18 @@ do_node_help(void)
" (default: /tmp)\n"));
puts("");
printf(_("NODE SERVICE\n"));
puts("");
printf(_(" \"node service\" executes a system service command to stop/start/restart/reload a node\n" \
" or optionally display which command would be executed\n"));
puts("");
printf(_(" Configuration file required, runs on local node only.\n"));
puts("");
printf(_(" --dry-run show what action would be performed, but don't execute it\n"));
printf(_(" --action action to perform (one of \"start\", \"stop\", \"restart\" or \"reload\")\n"));
printf(_(" --list-actions show what command would be performed for each action\n"));
puts("");
}