Fixes on deployment

This commit is contained in:
Marc Aymerich 2015-10-01 19:08:34 +00:00
parent 3c419cd261
commit a1a721b1c2

View file

@ -43,7 +43,9 @@ class Command(BaseCommand):
} }
run(textwrap.dedent("""\ run(textwrap.dedent("""\
su postgres -c "psql -c \\"CREATE USER %(db_user)s PASSWORD '%(db_password)s';\\"" su postgres -c "psql -c \\"CREATE USER %(db_user)s PASSWORD '%(db_password)s';\\"" || {
su postgres -c "psql -c \\"ALTER USER %(db_user)s WITH PASSWORD '%(db_password)s';\\""
}
su postgres -c "psql -c \\"CREATE DATABASE %(db_name)s OWNER %(db_user)s;\\""\ su postgres -c "psql -c \\"CREATE DATABASE %(db_name)s OWNER %(db_user)s;\\""\
""") % context, valid_codes=(0,1) """) % context, valid_codes=(0,1)
) )