mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
daemon (start|stop): verify that repmgrd starts/stops.
Note this may not always be possible for "daemon stop" if we are unable to determine the repmgrd PID.
This commit is contained in:
@@ -254,7 +254,11 @@ main(int argc, char **argv)
|
||||
|
||||
/* -w/--wait */
|
||||
case 'w':
|
||||
runtime_options.wait = true;
|
||||
runtime_options.wait_provided = true;
|
||||
if (optarg != NULL)
|
||||
{
|
||||
runtime_options.wait = repmgr_atoi(optarg, "--wait", &cli_errors, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
/* -W/--no-wait */
|
||||
@@ -1713,17 +1717,19 @@ check_cli_parameters(const int action)
|
||||
|
||||
/* --wait/--no-wait */
|
||||
|
||||
if (runtime_options.wait == true && runtime_options.no_wait == true)
|
||||
if (runtime_options.wait_provided == true && runtime_options.no_wait == true)
|
||||
{
|
||||
item_list_append_format(&cli_errors,
|
||||
_("both --wait and --no-wait options provided"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (runtime_options.wait)
|
||||
if (runtime_options.wait_provided)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case DAEMON_START:
|
||||
case DAEMON_STOP:
|
||||
case STANDBY_FOLLOW:
|
||||
break;
|
||||
default:
|
||||
@@ -1736,6 +1742,8 @@ check_cli_parameters(const int action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case DAEMON_START:
|
||||
case DAEMON_STOP:
|
||||
case NODE_REJOIN:
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user