From 69a6aeeb79881cdde0216e4fd1faaa24137ebf57 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Thu, 7 Jan 2016 10:52:31 +0000 Subject: [PATCH] Make "dinitctl start" start a service and "dinitctl stop" stop a service, rather than the other way around... --- src/dinitctl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dinitctl.cc b/src/dinitctl.cc index 3e1782a..5be3ebc 100644 --- a/src/dinitctl.cc +++ b/src/dinitctl.cc @@ -91,10 +91,10 @@ int main(int argc, char **argv) } } else if (command == 0) { - if (strcmp(argv[i], "start")) { + if (strcmp(argv[i], "start") == 0) { command = START_SERVICE; } - else if (strcmp(argv[i], "stop")) { + else if (strcmp(argv[i], "stop") == 0) { command = STOP_SERVICE; } else { @@ -110,7 +110,7 @@ int main(int argc, char **argv) } } - if (service_name == nullptr || command = 0) { + if (service_name == nullptr || command == 0) { show_help = true; } -- 2.25.1