diff --git a/Borealis.ps1 b/Borealis.ps1 index 6a18b8a..b1e1a2b 100644 --- a/Borealis.ps1 +++ b/Borealis.ps1 @@ -324,6 +324,17 @@ switch ($choice) { "1" { $host.UI.RawUI.WindowTitle = "Borealis Server" Write-Host "Ensuring Server Dependencies Exist..." -ForegroundColor DarkCyan + + # ---------------------- Ensure users.json is Present ---------------------- + Run-Step "Config: users.json" { + $usersJsonPath = Join-Path $scriptDir "users.json" + if (-not (Test-Path $usersJsonPath)) { + $defaultUsers = @{ users = @(@{ username = "admin"; password = "e6c83b282aeb2e022844595721cc00bbda47cb24537c1779f9bb84f04039e1676e6ba8573e588da1052510e3aa0a32a9e55879ae22b0c2d62136fc0a3e85f8bb" }) } | + ConvertTo-Json -Depth 4 + Set-Content -Path $usersJsonPath -Value $defaultUsers -Encoding UTF8 + } + } + Install_Shared_Dependencies Install_Server_Dependencies diff --git a/users.json b/users.json deleted file mode 100644 index 1ae8fc2..0000000 --- a/users.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "users": [ - { - "username": "admin", - "password": "e6c83b282aeb2e022844595721cc00bbda47cb24537c1779f9bb84f04039e1676e6ba8573e588da1052510e3aa0a32a9e55879ae22b0c2d62136fc0a3e85f8bb" - } - ] -} -