From 84192b7cb74c91d00308ae8079e1d84dd643d125 Mon Sep 17 00:00:00 2001 From: Saeed Vaziry Date: Sun, 17 Sep 2023 11:08:47 +0200 Subject: [PATCH] fix default key names --- app/Listeners/BroadcastListener.php | 2 +- app/ServerTypes/Regular.php | 3 ++- config/core.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Listeners/BroadcastListener.php b/app/Listeners/BroadcastListener.php index 6fa9b16..8623ebe 100644 --- a/app/Listeners/BroadcastListener.php +++ b/app/Listeners/BroadcastListener.php @@ -13,7 +13,7 @@ public function __construct() public function handle(Broadcast $event): void { - Cache::set('broadcast', [ + Cache::put('broadcast', [ 'type' => $event->type, 'data' => $event->data, ], now()->addMinutes(5)); diff --git a/app/ServerTypes/Regular.php b/app/ServerTypes/Regular.php index 42a0482..a888958 100755 --- a/app/ServerTypes/Regular.php +++ b/app/ServerTypes/Regular.php @@ -2,6 +2,7 @@ namespace App\ServerTypes; +use App\Enums\ServerStatus; use App\Events\Broadcast; use App\Jobs\Installation\Initialize; use App\Jobs\Installation\InstallCertbot; @@ -79,7 +80,7 @@ public function install(): void $jobs[] = function () { $this->server->update([ - 'status' => 'ready', + 'status' => ServerStatus::READY, 'progress' => 100, ]); event( diff --git a/config/core.php b/config/core.php index e954d49..e018ea7 100755 --- a/config/core.php +++ b/config/core.php @@ -36,8 +36,8 @@ * SSH */ 'ssh_user' => env('SSH_USER', 'vito'), - 'ssh_public_key_name' => env('SSH_PUBLIC_KEY_NAME'), - 'ssh_private_key_name' => env('SSH_PRIVATE_KEY_NAME'), + 'ssh_public_key_name' => env('SSH_PUBLIC_KEY_NAME', 'ssh-public.key'), + 'ssh_private_key_name' => env('SSH_PRIVATE_KEY_NAME', 'ssh-private.pem'), 'logs_disk' => env('SERVER_LOGS_DISK', 'server-logs-local'), 'key_pairs_disk' => env('KEY_PAIRS_DISK', 'key-pairs-local'),