Skip to content

Commit dfc6df9

Browse files
committed
Fix script so that it works in current postgres container.
1 parent aced58e commit dfc6df9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

create-multiple-postgresql-databases.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ function create_user_and_database() {
1010
CREATE USER $database;
1111
CREATE DATABASE $database;
1212
GRANT ALL PRIVILEGES ON DATABASE $database TO $database;
13-
EOSQL
13+
EOSQL
1414
}
1515

16-
if [ $POSTGRES_MULTIPLE_DATABASES ]; then
16+
if [ -n "$POSTGRES_MULTIPLE_DATABASES" ]; then
1717
echo "Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES"
1818
for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do
1919
create_user_and_database $db

0 commit comments

Comments
 (0)