Add production seeder

Add ssh-key custom storage
This commit is contained in:
Andras Bacsai
2023-04-14 10:30:53 +02:00
parent bb694cbffd
commit 310cac8233
3 changed files with 30 additions and 11 deletions

View File

@@ -59,9 +59,9 @@ if (!function_exists('remoteProcess')) {
if (!function_exists('savePrivateKeyForServer')) {
function savePrivateKeyForServer(Server $server)
{
$temp_file = 'id.rsa_' . 'root' . '@' . $server->ip;
Storage::disk('local')->put($temp_file, $server->privateKey->private_key, 'private');
return '/var/www/html/storage/app/' . $temp_file;
$temp_file = "id.root@{$server->ip}";
Storage::disk('ssh-keys')->put($temp_file, $server->privateKey->private_key, 'private');
return '/var/www/html/storage/app/ssh-keys/' . $temp_file;
}
}