chore: Update SSH key generation in install.sh script

This commit is contained in:
Andras Bacsai
2024-09-20 11:04:26 +02:00
parent f1881d5c35
commit be8573c828
3 changed files with 78 additions and 60 deletions

View File

@@ -8,18 +8,18 @@ class PopulateSshKeysAndClearMuxDirectory extends Migration
{
public function up()
{
Storage::disk('ssh-keys')->deleteDirectory('');
Storage::disk('ssh-keys')->makeDirectory('');
// Storage::disk('ssh-keys')->deleteDirectory('');
// Storage::disk('ssh-keys')->makeDirectory('');
Storage::disk('ssh-mux')->deleteDirectory('');
Storage::disk('ssh-mux')->makeDirectory('');
PrivateKey::chunk(100, function ($keys) {
foreach ($keys as $key) {
$key->storeInFileSystem();
if ($key->id === 0) {
Storage::disk('ssh-keys')->put('id.root@host.docker.internal', $key->private_key);
}
}
});
// Storage::disk('ssh-mux')->deleteDirectory('');
// Storage::disk('ssh-mux')->makeDirectory('');
// PrivateKey::chunk(100, function ($keys) {
// foreach ($keys as $key) {
// $key->storeInFileSystem();
// if ($key->id === 0) {
// Storage::disk('ssh-keys')->put('id.root@host.docker.internal', $key->private_key);
// }
// }
// });
}
}