Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,10 @@ function init_db() {
if [ "$ENABLE_CORE" = "true" ] && [ "$CORE_USE_POSTGRES" = "true" ]; then
run_silent "create-core-db" sudo -u postgres createdb core
fi
run_silent "stellar-postgres-user" sudo -u postgres psql <<-SQL
CREATE USER $PGUSER WITH PASSWORD '$PGPASS';
$([ "$ENABLE_HORIZON" = "true" ] && echo "GRANT ALL PRIVILEGES ON DATABASE horizon to $PGUSER;")
$([ "$ENABLE_CORE" = "true" ] && [ "$CORE_USE_POSTGRES" = "true" ] && echo "GRANT ALL PRIVILEGES ON DATABASE core to $PGUSER;")
run_silent "stellar-postgres-user" sudo -u postgres psql -v pguser="$PGUSER" -v pgpass="$PGPASS" <<-SQL
CREATE USER :"pguser" WITH PASSWORD :'pgpass';
$([ "$ENABLE_HORIZON" = "true" ] && echo "GRANT ALL PRIVILEGES ON DATABASE horizon to :\"pguser\";")
$([ "$ENABLE_CORE" = "true" ] && [ "$CORE_USE_POSTGRES" = "true" ] && echo "GRANT ALL PRIVILEGES ON DATABASE core to :\"pguser\";")
SQL

touch .quickstart-initialized
Expand Down