Always use service restart for startup

By starting MaxScale with `service restart maxscale`, the start() function
is idempotent: MaxScale is started from a stopped state.
This commit is contained in:
Markus Mäkelä 2018-11-05 14:00:57 +02:00
parent eb1bc0b768
commit a53dbeec57
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 5 additions and 10 deletions

View File

@ -230,13 +230,6 @@ int Maxscales::restart_maxscale(int m)
return res;
}
int Maxscales::start_maxscale(int m)
{
int res = ssh_node(m, "service maxscale start", true);
fflush(stdout);
return res;
}
int Maxscales::stop_maxscale(int m)
{
int res = ssh_node(m, "service maxscale stop", true);
@ -244,7 +237,6 @@ int Maxscales::stop_maxscale(int m)
return res;
}
int Maxscales::execute_maxadmin_command(int m, const char* cmd)
{
return ssh_node_f(m, true, "maxadmin %s", cmd);

View File

@ -250,9 +250,12 @@ public:
}
/**
* @brief start_maxscale Issues 'service maxscale start' command
* @brief alias for restart_maxscale
*/
int start_maxscale(int m = 0);
int start_maxscale(int m = 0)
{
return restart_maxscale(m);
}
int start(int m = 0)
{
return start_maxscale(m);