diff --git a/windows/resources/install-postgresql.ps1 b/windows/resources/install-postgresql.ps1 index 6a9d14d..3a11505 100644 --- a/windows/resources/install-postgresql.ps1 +++ b/windows/resources/install-postgresql.ps1 @@ -31,4 +31,12 @@ Function Install-PostgreSQL() { Start-PSQL "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;" Start-PSQL "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;" Start-PSQL "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;" -} \ No newline at end of file + + #move pg_hba.conf + Move-Item "C:\Program Files\PostgreSQL\10\data\pg_hba.conf" "C:\Program Files\PostgreSQL\10\data\BAK_pg_hba.conf" + Copy-Item ".\postgresql\pg_hba.conf" "C:\Program Files\PostgreSQL\10\data\" -recurse + + #reload + C:\Windows\system32\cscript.exe //NoLogo "C:\Program Files\PostgreSQL\10\scripts\serverctl.vbs" reload + +}