From: Davin McCall Date: Thu, 7 Jan 2016 10:52:31 +0000 (+0000) Subject: Make "dinitctl start" start a service and "dinitctl stop" stop a X-Git-Tag: v0.01~50 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=69a6aeeb79881cdde0216e4fd1faaa24137ebf57;p=oweals%2Fdinit.git Make "dinitctl start" start a service and "dinitctl stop" stop a service, rather than the other way around... --- 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; }