mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-20 02:11:36 +00:00
23 lines
498 B
PHP
Executable File
23 lines
498 B
PHP
Executable File
<?php
|
|
|
|
namespace App\ServerProviders;
|
|
|
|
use App\Contracts\ServerProvider;
|
|
use App\Models\Server;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
abstract class AbstractProvider implements ServerProvider
|
|
{
|
|
protected ?Server $server;
|
|
|
|
public function __construct(Server $server = null)
|
|
{
|
|
$this->server = $server;
|
|
}
|
|
|
|
protected function generateKeyPair(): void
|
|
{
|
|
generate_key_pair(Storage::disk(config('core.key_pairs_disk'))->path((string) $this->server->id));
|
|
}
|
|
}
|