mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
use blade as conmmands template (#444)
* use blade as conmmands template * fix lint * fix ssl
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user