diff options
author | Tilo Spannagel <development@tilosp.de> | 2017-08-29 11:54:54 +0200 |
---|---|---|
committer | Tilo Spannagel <development@tilosp.de> | 2017-08-29 11:54:54 +0200 |
commit | d87b840646635ba5b8fb92f19f72fe9e6486251e (patch) | |
tree | 1d251188d8ddc0fe3a7f60407e24edafae4fa1df /12.0/fpm | |
parent | ea347ffbca6595952a7031f2af2b36ca5c36b189 (diff) |
Add data directory default12.0.2-fpm11.0.4-fpm
Diffstat (limited to '12.0/fpm')
-rw-r--r-- | 12.0/fpm/config/autoconfig.php | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/12.0/fpm/config/autoconfig.php b/12.0/fpm/config/autoconfig.php index 7ff1d3ea..b759f4d1 100644 --- a/12.0/fpm/config/autoconfig.php +++ b/12.0/fpm/config/autoconfig.php @@ -1,29 +1,34 @@ <?php + +$autoconfig_enabled = false; + if (getenv('SQLITE_DATABASE')) { $AUTOCONFIG["dbtype"] = "sqlite"; $AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE'); - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + $autoconfig_enabled = true; } elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { $AUTOCONFIG["dbtype"] = "mysql"; $AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE'); $AUTOCONFIG["dbuser"] = getenv('MYSQL_USER'); $AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST'); - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + $autoconfig_enabled = true; } elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { $AUTOCONFIG["dbtype"] = "pgsql"; $AUTOCONFIG["dbname"] = getenv('POSTGRES_DB'); $AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER'); $AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD'); $AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST'); - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + $autoconfig_enabled = true; } -if (getenv('NEXTCLOUD_DATA_DIR')) { - $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR'); -} +if ($autoconfig_enabled) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + + $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; -if (getenv('NEXTCLOUD_ADMIN_USER') && getenv('NEXTCLOUD_ADMIN_PASSWORD')) { - $AUTOCONFIG["adminlogin"] = getenv('NEXTCLOUD_ADMIN_USER'); - $AUTOCONFIG["adminpass"] = getenv('NEXTCLOUD_ADMIN_PASSWORD'); + if (getenv('NEXTCLOUD_ADMIN_USER') && getenv('NEXTCLOUD_ADMIN_PASSWORD')) { + $AUTOCONFIG["adminlogin"] = getenv('NEXTCLOUD_ADMIN_USER'); + $AUTOCONFIG["adminpass"] = getenv('NEXTCLOUD_ADMIN_PASSWORD'); + } } |