| | |
| | | printf("is %s", (d_ptr->controller.isInstalled() ? "installed" : "not installed")); |
| | | printf(" and %s\n\n", (d_ptr->controller.isRunning() ? "running" : "not running")); |
| | | return 0; |
| | | } else if (a == QLatin1String("-s") || a == QLatin1String("-start")) { |
| | | } else if (a == QLatin1String("-e") || a == QLatin1String("-exec")) { |
| | | d_ptr->args.removeAt(1); |
| | | int ec = d_ptr->run(false, d_ptr->args); |
| | | if (ec == -1) |
| | | qErrnoWarning("The service could not be executed."); |
| | | return ec; |
| | | } else if (a == QLatin1String("-ss") || a == QLatin1String("-stop")) { |
| | | } else if (a == QLatin1String("-t") || a == QLatin1String("-terminate")) { |
| | | if (!d_ptr->controller.stop()) |
| | | qErrnoWarning("The service could not be stopped."); |
| | | return 0; |