Permalink
Browse files

Trivial refactoring of postgresbuilder.sh

  • Loading branch information...
1 parent ae6afc3 commit 5b3a6e29d8c3f5192d3300c2386740076d75a0a0 @elimisteve elimisteve committed Aug 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 server-scripts/postgresbuilder.sh
@@ -12,11 +12,12 @@ if [ $# -lt 2 ]; then
fi
project_name=$1
+password=$2
+
db_name=$project_name
# NOTE: $username definition assumes settings.py-needed still defined
# 'USER' as %(PROJECT_NAME)s_user
username=${project_name}_user
-password=$2
sudo -u postgres psql -a -U postgres -d template1 -c "CREATE USER $username WITH PASSWORD '$password';"
sudo -u postgres psql -a -U postgres -d template1 -c "CREATE DATABASE $db_name OWNER $username ENCODING 'UTF8';"

0 comments on commit 5b3a6e2

Please sign in to comment.