forked from norman/fusionpbx-install.sh-github-mirror
Update the Windows install.
This commit is contained in:
15
windows/resources/get-database_password.ps1
Normal file
15
windows/resources/get-database_password.ps1
Normal file
@@ -0,0 +1,15 @@
|
||||
#includes
|
||||
. .\resources\new-password.ps1
|
||||
|
||||
#Database Password
|
||||
if ($env:PGPASSWORD) {
|
||||
$database_password = $env:PGPASSWORD
|
||||
}
|
||||
if ($database_password -eq 'random') {
|
||||
$database_password = New-Password 20
|
||||
}
|
||||
elseif ($database_password -eq '') {
|
||||
$database_password = Read-Host -Prompt "Enter database superuser (postgres) password"
|
||||
}
|
||||
#Set DB password
|
||||
$env:PGPASSWORD = "$database_password"
|
||||
Reference in New Issue
Block a user