mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-20 10:21:37 +00:00
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
25 lines
595 B
PHP
Executable File
25 lines
595 B
PHP
Executable File
<?php
|
|
|
|
namespace App\ServerProviders;
|
|
|
|
use App\Models\Server;
|
|
use Illuminate\Filesystem\FilesystemAdapter;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
abstract class AbstractProvider implements ServerProvider
|
|
{
|
|
protected ?Server $server;
|
|
|
|
public function __construct(?Server $server = null)
|
|
{
|
|
$this->server = $server;
|
|
}
|
|
|
|
public function generateKeyPair(): void
|
|
{
|
|
/** @var FilesystemAdapter $storageDisk */
|
|
$storageDisk = Storage::disk(config('core.key_pairs_disk'));
|
|
generate_key_pair($storageDisk->path((string) $this->server->id));
|
|
}
|
|
}
|