From 76a130e5d2be7e1fccac933ec0fb59cf6d4d70f1 Mon Sep 17 00:00:00 2001 From: "Calvin Winkowski (Telnoratti)" Date: Wed, 17 Aug 2016 16:27:19 -0400 Subject: [PATCH 1/2] Fix psql_exec commands to work with different passwords. --- scripts/installer/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/installer/install b/scripts/installer/install index 0475c37171f..744f86f0997 100755 --- a/scripts/installer/install +++ b/scripts/installer/install @@ -807,7 +807,7 @@ else print TMPCMD $sql_command; close TMPCMD; - my $psql_commandline = $psql_exec . "/psql -h " . $CONFIG_DEFAULTS{'POSTGRES_SERVER'} . " -U postgres -d postgres -f /tmp/pgcmd.$$.tmp >/dev/null 2>&1"; + my $psql_commandline = $psql_admin_exec . "/psql -h " . $CONFIG_DEFAULTS{'POSTGRES_SERVER'} . " -U postgres -d postgres -f /tmp/pgcmd.$$.tmp >/dev/null 2>&1"; my $out = qx($psql_commandline 2>&1); my $exitcode = $?; @@ -829,8 +829,8 @@ else print "\nCreating Postgres database:\n"; my $psql_command = - $psql_admin_exec - . "/createdb -h " . $CONFIG_DEFAULTS{'POSTGRES_SERVER'} . " -U postgres " + $psql_exec + . "/createdb -h " . $CONFIG_DEFAULTS{'POSTGRES_SERVER'} . " -U dvnapp " . $CONFIG_DEFAULTS{'POSTGRES_DATABASE'} . " --owner=" . $CONFIG_DEFAULTS{'POSTGRES_USER'}; From d315204aa08c0141141b78cc547b05d77c1e9098 Mon Sep 17 00:00:00 2001 From: "Calvin Winkowski (Telnoratti)" Date: Tue, 27 Sep 2016 12:43:45 -0400 Subject: [PATCH 2/2] Use CONFIG_DEFAULTS for postgres user. --- scripts/installer/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/installer/install b/scripts/installer/install index 744f86f0997..8e1008ec997 100755 --- a/scripts/installer/install +++ b/scripts/installer/install @@ -830,7 +830,7 @@ else my $psql_command = $psql_exec - . "/createdb -h " . $CONFIG_DEFAULTS{'POSTGRES_SERVER'} . " -U dvnapp " + . "/createdb -h " . $CONFIG_DEFAULTS{'POSTGRES_SERVER'} . " -U $CONFIG_DEFAULTS{'POSTGRES_USER'} " . $CONFIG_DEFAULTS{'POSTGRES_DATABASE'} . " --owner=" . $CONFIG_DEFAULTS{'POSTGRES_USER'};