Skip to content

Commit

Permalink
Merge pull request #3292 from telnoratti/fix_install_pw
Browse files Browse the repository at this point in the history
Fix psql_exec commands to work with different passwords.
  • Loading branch information
kcondon authored Oct 13, 2016
2 parents 6261321 + d315204 commit ca52c47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/installer/install
Original file line number Diff line number Diff line change
Expand Up @@ -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 = $?;
Expand All @@ -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 $CONFIG_DEFAULTS{'POSTGRES_USER'} "
. $CONFIG_DEFAULTS{'POSTGRES_DATABASE'}
. " --owner="
. $CONFIG_DEFAULTS{'POSTGRES_USER'};
Expand Down

0 comments on commit ca52c47

Please sign in to comment.