public function restart() : int
    {
        $pid = $this->getServerPid();
        if (empty($pid)) {
            return $this->start();
        }
        $stopped = $this->stop();
        if ($stopped !== true) {
            throw new ControlException('Error while stopping current Angela process.');
        }
        return $this->start();
    }