mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-09-10 23:08:43 -06:00
Incorporate Dynamic users.json Generation
This commit is contained in:
11
Borealis.ps1
11
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
|
||||
|
||||
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"username": "admin",
|
||||
"password": "e6c83b282aeb2e022844595721cc00bbda47cb24537c1779f9bb84f04039e1676e6ba8573e588da1052510e3aa0a32a9e55879ae22b0c2d62136fc0a3e85f8bb"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user