use blade as conmmands template (#444)

* use blade as conmmands template

* fix lint

* fix ssl
This commit is contained in:
Saeed Vaziry
2025-01-27 21:27:58 +01:00
committed by GitHub
parent a73476c1dd
commit cdbde063f0
208 changed files with 1080 additions and 1012 deletions

View File

@ -2,14 +2,13 @@
namespace App\SSH\Services\Redis;
use App\SSH\HasScripts;
use App\Exceptions\ServiceInstallationFailed;
use App\Exceptions\SSHError;
use App\SSH\Services\AbstractService;
use Closure;
class Redis extends AbstractService
{
use HasScripts;
public function creationRules(array $input): array
{
return [
@ -25,10 +24,14 @@ function (string $attribute, mixed $value, Closure $fail) {
];
}
/**
* @throws ServiceInstallationFailed
* @throws SSHError
*/
public function install(): void
{
$this->service->server->ssh()->exec(
$this->getScript('install.sh'),
view('ssh.services.redis.install'),
'install-redis'
);
$status = $this->service->server->systemd()->status($this->service->unit);
@ -36,10 +39,13 @@ public function install(): void
$this->service->server->os()->cleanup();
}
/**
* @throws SSHError
*/
public function uninstall(): void
{
$this->service->server->ssh()->exec(
$this->getScript('uninstall.sh'),
view('ssh.services.redis.uninstall'),
'uninstall-redis'
);
$this->service->server->os()->cleanup();