database/install.sh in message-db-2.0.2 vs database/install.sh in message-db-2.1.0
- old
+ new
@@ -20,10 +20,21 @@
export DATABASE_NAME=$database
else
database=$DATABASE_NAME
fi
+
+if [ -z ${CREATE_DATABASE+x} ]; then
+ CREATE_DATABASE="on"
+fi
+
+create_database=true
+if [ "$CREATE_DATABASE" = "off" ] ; then
+ create_database=false
+fi
+
+
if [ -z ${PGOPTIONS+x} ]; then
export PGOPTIONS='-c client_min_messages=warning'
fi
function create-user {
@@ -64,10 +75,14 @@
create-user
echo
echo "Creating Database"
echo "- - -"
-create-database
+if [ "$create_database" = true ] ; then
+ create-database
+else
+ echo "Database creation is deactivated. Not creating the database."
+fi
echo
echo "Creating Schema"
echo "- - -"
create-schema