mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Introduce new class Icinga\Clicommands\DaemonCommand
This commit is contained in:
parent
9ed1323e34
commit
4301bedcbb
22
application/clicommands/DaemonCommand.php
Normal file
22
application/clicommands/DaemonCommand.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Clicommands;
|
||||
|
||||
use Icinga\Application\Daemon;
|
||||
use Icinga\Cli\Command;
|
||||
use Icinga\Data\ConfigObject;
|
||||
use React\EventLoop\Loop;
|
||||
|
||||
class DaemonCommand extends Command
|
||||
{
|
||||
public function runAction()
|
||||
{
|
||||
// TODO: Decide where to fetch the socket path for the webserver from (ini? which ini? envvar?)
|
||||
(new Daemon())
|
||||
->addJob(new Daemon\HttpJob(new ConfigObject()))
|
||||
->run();
|
||||
|
||||
Loop::get()->run();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user