vito/app/Jobs/Installation/UninstallPHP.php
Saeed Vaziry 5c72f12490 init
2023-07-02 12:47:50 +02:00

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');
}
}