Skip to content

Commit

Permalink
come on already
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed Jun 10, 2020
1 parent 4b1bab4 commit 0b00af4
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,16 @@ jobs:
$psqldir = (([System.IO.Path]::GetDirectoryName([System.IO.Path]::GetDirectoryName($psqlPath))))
$cfgdir = Join-Path -Path $psqldir -ChildPath data
$cfgpath = Join-Path -Path $cfgdir -ChildPath "pg_hba.conf"
Write-Output "Getting network info"
Get-NetIPAddress | Format-Table
# Write-Output "Getting network info"
# Get-NetIPAddress | Format-Table
Write-Output "Existing pg_hba.conf:"
type $cfgpath
Write-Output "Writing to pg_hba config at: $cfgpath"
Set-Content "$cfgpath" "host all all ::1/128 trust"
Add-Content "$cfgpath" "host all all 127.0.0.1/32 trust"
$serviceName = (Get-CimInstance Win32_Service -Filter "Name LIKE 'postgresql-%'").Name
# the service name is "postgresql-x64-10", conveniently it's both the display name and the actual name
Write-Output "Looking up $serviceName"
Get-Service $serviceName
Write-Output "Restarting $serviceName"
Restart-Service $serviceName
# Write-Output "Writing to pg_hba config at: $cfgpath"
# Set-Content "$cfgpath" "host all all ::1/128 trust"
# Add-Content "$cfgpath" "host all all 127.0.0.1/32 trust"
$serviceName = Get-Service -Name postgresql*
Set-Service -InputObject $serviceName -StartupType Automatic
Start-Service -InputObject $serviceName
createdb.exe -U postgres dbt
psql.exe -U postgres -c "CREATE ROLE root WITH PASSWORD 'password';"
Expand Down

0 comments on commit 0b00af4

Please sign in to comment.