service = $service; } /** * @throws InstallationFailed * @throws Throwable */ public function handle(): void { $ssh = $this->service->server->ssh(); $ssh->exec(new InstallSupervisorCommand(), 'install-supervisor'); $status = $ssh->exec(new ServiceStatusCommand($this->service->unit), 'supervisor-status'); $this->service->validateInstall($status); $this->service->update([ 'status' => ServiceStatus::READY, ]); } }