From 0743c4f53f1c27c6ddc2bda9834805b520d040dc Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Tue, 10 Jun 2014 23:50:20 +0530 Subject: [PATCH] init: set the DB_TYPE variable only if it has not already been set --- assets/init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/init b/assets/init index f19c8a5e..20c6e50d 100755 --- a/assets/init +++ b/assets/init @@ -83,11 +83,11 @@ REDIS_PORT=${REDIS_PORT:-6379} # requires that the mysql or postgresql containers have exposed # port 3306 and 5432 respectively. if [ -n "${MYSQL_PORT_3306_TCP_ADDR}" ]; then - DB_TYPE=mysql + DB_TYPE=${DB_TYPE:-mysql} DB_HOST=${DB_HOST:-${MYSQL_PORT_3306_TCP_ADDR}} DB_PORT=${DB_PORT:-${MYSQL_PORT_3306_TCP_PORT}} elif [ -n "${POSTGRESQL_PORT_5432_TCP_ADDR}" ]; then - DB_TYPE=postgres + DB_TYPE=${DB_TYPE:-postgres} DB_HOST=${DB_HOST:-${POSTGRESQL_PORT_5432_TCP_ADDR}} DB_PORT=${DB_PORT:-${POSTGRESQL_PORT_5432_TCP_PORT}} fi