provision script fixes, flash the server creds to the user on server create

This commit is contained in:
2025-03-30 12:37:34 +00:00
parent 435a7ac1e3
commit 5ba1ac9c92
5 changed files with 21 additions and 1 deletions

View File

@@ -46,9 +46,12 @@ Route::get('/provision-script', function (Request $request) {
$script = file_get_contents(base_path('provision.sh'));
$keystonePublicKey = file_get_contents(storage_path('app/private/ssh/id_ed25519.pub'));
$script = str_replace('[!hostname!]', $validated['hostname'], $script);
$script = str_replace('[!sudo_password!]', $validated['sudo_password'], $script);
$script = str_replace('[!server_id!]', $validated['server_id'], $script);
$script = str_replace('[!keystonepublickey!]', $keystonePublicKey, $script);
return response($script)
->header('Content-Type', 'text/plain');