Permalink
Browse files

changing the default postges role from the username to the postgres user

  • Loading branch information...
1 parent e8e2383 commit 5349144c48db387f35eaae018089815d36535b09 @mkocher mkocher committed Feb 2, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 recipes/postgres.rb
View
@@ -23,7 +23,7 @@
brew_install "postgresql"
execute "create the database" do
- command %'initdb -U #{WS_USER} --encoding=utf8 --locale=en_US /usr/local/var/postgres'
+ command %'initdb -U postgres --encoding=utf8 --locale=en_US /usr/local/var/postgres'
user WS_USER
end
@@ -52,7 +52,7 @@
end
execute "create the database" do
- command "createdb"
+ command "createdb -U postgres"
user WS_USER
end
# "initdb /tmp/junk.$$" will fail unless you modify sysctl variables
@@ -84,7 +84,7 @@
raise "postgres is not running: " << e
end
s.close
- `sudo -u #{WS_USER} psql < /dev/null`
+ `sudo -u #{WS_USER} psql -U postgres < /dev/null`
if $?.to_i != 0
raise "I couldn't invoke postgres!"
end

0 comments on commit 5349144

Please sign in to comment.