Skip to content

Commit 78bad9c

Browse files
scottillogicalgeofffranks
authored andcommitted
Admin's accounts weren't actually being created (#10)
* debug logging * Update ctl * Update ctl * Update ctl * Update ctl * Update ctl * Update ctl * removing debuggers * Update ctl
1 parent 46d6c72 commit 78bad9c

File tree

1 file changed

+3
-1
lines changed
  • jobs/postgres/templates/bin

1 file changed

+3
-1
lines changed

jobs/postgres/templates/bin/ctl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ EOF
107107
<% p('pgpool.users', []).each do |user| %>
108108
echo >>$LOG_DIR/$JOB_NAME.log "[postgres] setting up user <%= user['username'] %>"
109109
echo "[$(date)] setting up user <%= user['username'] %>"
110+
<% admin = '-DRS' %>
111+
<% admin = '-drs' if user["admin"] %>
110112
set -x
111113

112-
createuser -U vcap -p <%= port %> <% if user['admin'] %>-drs<% else %>-DRS<% end %> -El <%= user['username'] %>
114+
createuser -U vcap -p <%= port %> <%=admin %> -El <%= user['username'] %>
113115
createdb -U vcap -p <%= port %> -O <%= user['username'] %> <%= user['username'] %>
114116

115117
psql -p <%= port %> -U vcap postgres -c "ALTER ROLE \"<%= user['username'] %>\" WITH PASSWORD '<%= user['password'] %>'"

0 commit comments

Comments
 (0)