mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-21 19:01:37 +00:00
29 lines
594 B
PHP
Executable File
29 lines
594 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Jobs\Installation;
|
|
|
|
use App\Exceptions\InstallationFailed;
|
|
use App\Models\Service;
|
|
use App\SSHCommands\UninstallPHPCommand;
|
|
use Throwable;
|
|
|
|
class UninstallPHP extends InstallationJob
|
|
{
|
|
protected Service $service;
|
|
|
|
public function __construct(Service $service)
|
|
{
|
|
$this->service = $service;
|
|
}
|
|
|
|
/**
|
|
* @throws InstallationFailed
|
|
* @throws Throwable
|
|
*/
|
|
public function handle(): void
|
|
{
|
|
$ssh = $this->service->server->ssh();
|
|
$ssh->exec(new UninstallPHPCommand($this->service->version), 'uninstall-php');
|
|
}
|
|
}
|