mirror of
https://github.com/QuasarApp/Patronum.git
synced 2025-04-28 16:44:31 +00:00
simple fixes
This commit is contained in:
parent
15da148a35
commit
ad3e78cf71
@ -132,16 +132,19 @@ QList<Feature> Controller::features() {
|
||||
}
|
||||
|
||||
void Controller::printDefaultHelp() const {
|
||||
|
||||
auto quasarappHelp = QuasarAppUtils::Params::getparamsHelp();
|
||||
|
||||
QuasarAppUtils::Help::Charters help{{"General options of this controller",{
|
||||
{"start", QObject::tr("Start a service")},
|
||||
{"stop", QObject::tr("Stop a service")},
|
||||
{"pause", QObject::tr("Pause a service")},
|
||||
{"resume", QObject::tr("Resume a service")},
|
||||
{"install", QObject::tr("Install a service")},
|
||||
{"uninstall", QObject::tr("Uninstall a service")}
|
||||
}}};
|
||||
{"start", QObject::tr("Start a service")},
|
||||
{"stop", QObject::tr("Stop a service")},
|
||||
{"pause", QObject::tr("Pause a service")},
|
||||
{"resume", QObject::tr("Resume a service")},
|
||||
{"install", QObject::tr("Install a service")},
|
||||
{"uninstall", QObject::tr("Uninstall a service")}
|
||||
}}};
|
||||
|
||||
QuasarAppUtils::Help::print(help);
|
||||
QuasarAppUtils::Help::print(quasarappHelp.unite(help));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -91,10 +91,14 @@ int ServiceBase::exec() {
|
||||
d_ptr->listen();
|
||||
|
||||
});
|
||||
} else if (!controller()->send()) {
|
||||
return static_cast<int>(ControllerError::ServiceUnavailable);
|
||||
}
|
||||
|
||||
QTimer::singleShot(0, [this](){
|
||||
if (!controller()->send()) {
|
||||
_core->exit(static_cast<int>(ControllerError::ServiceUnavailable));
|
||||
}
|
||||
});
|
||||
|
||||
return _core->exec();
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
namespace Patronum {
|
||||
|
||||
const QString systemDPath = "/etc/systemd/system/";
|
||||
static bool isServiceInited = false;
|
||||
|
||||
InstallerSystemD::InstallerSystemD(const QString& name):
|
||||
BaseInstaller(name) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user