From dc824ac2df1859a48538978589a4b597b456f458 Mon Sep 17 00:00:00 2001 From: Richard Kuhnt Date: Mon, 9 Dec 2019 16:53:30 +0100 Subject: [PATCH] postgresql: Improve post_install and notes --- bucket/postgresql.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bucket/postgresql.json b/bucket/postgresql.json index 23518fdf23..0feeee313b 100644 --- a/bucket/postgresql.json +++ b/bucket/postgresql.json @@ -21,8 +21,16 @@ "env_set": { "PGDATA": "$dir\\data" }, - "post_install": "if (!(Test-Path \"$dir\\data\\pg_hba.conf\")) { iex \"initdb --username=postgres --encoding=UTF8 --locale=en --lc-collate=C\" }", - "notes": "To start/stop service, run `pg_ctl start`, `pg_ctl stop`.", + "post_install": [ + "if (!(Test-Path \"$dir\\data\\pg_hba.conf\")) {", + " Invoke-ExternalCommand -FilePath \"$dir\\bin\\initdb.exe\" -ArgumentList \"--username=postgres --encoding=UTF8 --locale=en --lc-collate=C\" | Out-Null", + "}" + ], + "notes": [ + "Run run 'pg_ctl start' or 'pg_ctl stop' to start and stop the database or", + "register it as a service by running 'pg_ctl register -N PostgreSQL' from an elevated shell.", + "Default superuser login: postgres, password: " + ], "checkver": { "url": "https://www.enterprisedb.com/products-services-training/pgbindownload", "re": "Version ([\\d.]+)"