/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { if ($this->machine->isRunning()) { $this->machine->stop(); } $this->machine->start(); }
/** * {@inheritdoc} */ public function run() { try { $this->machine->start(); } catch (MachineException $e) { // Ignore the problem as if the machine is not running, we // will run the installer. } if (!$this->machine->isRunning()) { $this->dockerInstaller->run(); } }
private function restartMachine() { if ($this->machine->isRunning()) { $this->machine->stop(); } $this->machine->start(); }