From 9e63609c14fe2f023629b268ea7e8d3d591afe9f Mon Sep 17 00:00:00 2001 From: evgeniy-antonyuk Date: Tue, 27 Oct 2020 13:50:48 +0300 Subject: [PATCH] Fix custom db name bug (#304) Co-authored-by: papacarlo --- run-document-server.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/run-document-server.sh b/run-document-server.sh index e1b32c4..6196295 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -329,20 +329,12 @@ create_db_tbl() { } create_postgresql_tbl() { - CONNECTION_PARAMS="-h$DB_HOST -p$DB_PORT -U$DB_USER -w" if [ -n "$DB_PWD" ]; then export PGPASSWORD=$DB_PWD fi - PSQL="psql -q $CONNECTION_PARAMS" - CREATEDB="createdb $CONNECTION_PARAMS" - - # Create db on remote server - if $PSQL -lt | cut -d\| -f 1 | grep -qw $DB_NAME | grep 0; then - $CREATEDB $DB_NAME - fi - - $PSQL -d "$DB_NAME" -f "$APP_DIR/server/schema/postgresql/createdb.sql" + PSQL="psql -q -h$DB_HOST -p$DB_PORT -d$DB_NAME -U$DB_USER -w" + $PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql" } create_mysql_tbl() {