diff --git a/library/Director/Daemon/BackgroundDaemon.php b/library/Director/Daemon/BackgroundDaemon.php index c4cfd7f5..028dc296 100644 --- a/library/Director/Daemon/BackgroundDaemon.php +++ b/library/Director/Daemon/BackgroundDaemon.php @@ -76,6 +76,10 @@ class BackgroundDaemon $this->jobRunner = new JobRunner($this->loop); $this->systemd = $this->eventuallyInitializeSystemd(); $this->processState->setSystemd($this->systemd); + if ($this->systemd) { + $this->systemd->setReady(); + } + $this->setState('ready'); $this->processDetails = $this ->initializeProcessDetails($this->systemd) ->registerProcessList($this->jobRunner->getProcessList()); @@ -90,9 +94,7 @@ class BackgroundDaemon ->register($this->jobRunner) ->register($this->logProxy) ->run($this->loop); - if ($this->systemd) { - $this->systemd->setReady(); - } + $this->setState('running'); } /**