Make possible to install using a specific database host

When using MySQL and PostgreSQL the database host was always set to
localhost. Now it is possible to install the server using a specific
database host by setting the environment variable "$DATABASEHOST"; for
backwards compatibility, when none is set "localhost" is used by
default.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2018-02-12 01:53:54 +01:00
Родитель de668360c2
Коммит a364907b72
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -10,6 +10,7 @@ set -e
DATABASENAME=oc_autotest
DATABASEUSER=oc_autotest
[ -z "$DATABASEHOST" ] && DATABASEHOST="localhost"
ADMINLOGIN=admin
BASEDIR=$PWD
@ -64,7 +65,7 @@ cat > ./tests/autoconfig-mysql.php <<DELIM
'directory' => '$DATADIR',
'dbuser' => '$DATABASEUSER',
'dbname' => '$DATABASENAME',
'dbhost' => 'localhost',
'dbhost' => '$DATABASEHOST',
'dbpass' => 'owncloud',
);
DELIM
@ -80,7 +81,7 @@ cat > ./tests/autoconfig-pgsql.php <<DELIM
'directory' => '$DATADIR',
'dbuser' => '$DATABASEUSER',
'dbname' => '$DATABASENAME',
'dbhost' => 'localhost',
'dbhost' => '$DATABASEHOST',
'dbpass' => '',
);
DELIM