We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 16d3ef0 + b250b0f commit ca736c5Copy full SHA for ca736c5
1 file changed
src/install.ps1
@@ -19,7 +19,11 @@ $out = Get-LocalUser -Name $userName -ErrorAction SilentlyContinue
19
if($null -eq $out)
20
{
21
Write-Host "--- Adding local user '$userName' for patroni service ---" -ForegroundColor blue
22
- $Password = -join ((65..90) + (97..122) | Get-Random -Count 8 | % {[char]$_})
+ $Password = ("a".."z")+("A".."Z") | Get-Random -Count 4
23
+ $Password += ("!"..".") | Get-Random -Count 2
24
+ $Password += ("0".."9") | Get-Random -Count 2
25
+ $Password = -join($Password)
26
+
27
$SecurePassword = ConvertTo-SecureString $Password -AsPlainText -Force
28
New-LocalUser $userName -Password $SecurePassword -Description "Patroni service account"
29
$ConfFile = 'patroni\patroni_service.xml'
0 commit comments