qqq
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@ class ServerCommand extends Command
|
|||||||
$this->setName('sw:server')
|
$this->setName('sw:server')
|
||||||
->setDescription('server start|stop|reload|restart')
|
->setDescription('server start|stop|reload|restart')
|
||||||
->addArgument('action', InputArgument::OPTIONAL, 'run action', 'start')
|
->addArgument('action', InputArgument::OPTIONAL, 'run action', 'start')
|
||||||
->addOption('daemon', 'd', InputOption::VALUE_OPTIONAL, 'is run daemonize');
|
->addOption('daemon', 'd', InputOption::VALUE_NONE, 'is run daemonize');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ class ServerCommand extends Command
|
|||||||
*/
|
*/
|
||||||
protected function start(InputInterface $input): int
|
protected function start(InputInterface $input): int
|
||||||
{
|
{
|
||||||
$this->server->setDaemon((int)!is_null($input->getOption('daemon')));
|
$this->server->setDaemon((int)($input->getOption('daemon')));
|
||||||
$this->server->start();
|
$this->server->start();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user