This commit is contained in:
2021-08-17 18:35:11 +08:00
parent aab596d14d
commit 1cb36c8707
4 changed files with 38 additions and 24 deletions
+3 -5
View File
@@ -38,13 +38,11 @@ class Command extends \Console\Command
if (!in_array($dtl->get('action'), self::ACTIONS)) {
return 'I don\'t know what I want to do.';
}
/** @var Shutdown $shutdown */
$shutdown = Kiri::app()->get('shutdown');
if ($shutdown->isRunning() && $dtl->get('action') == 'start') {
if ($manager->isRunner() && $dtl->get('action') == 'start') {
return 'Service is running. Please use restart.';
}
$shutdown->shutdown();
$manager->shutdown();
if ($dtl->get('action') == 'stop') {
return 'shutdown success.';
}