diff options
author | Tilo Spannagel <development@tilosp.de> | 2019-06-22 19:08:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-22 19:08:34 +0200 |
commit | ea5b853ab3cdfc46f3eaf645337ce435955f1a00 (patch) | |
tree | a9b4152b09cf032641892298ddb5722c98b023e2 | |
parent | df048873ab32ed3dc226bef48c0c22e3590c7386 (diff) | |
parent | a87f914de35bb3bc7a54bf62fd2c3b8bff512bc2 (diff) |
Merge pull request #780 from J0WI/tbl-prefix
Avoid empty table prefix
-rw-r--r-- | .config/autoconfig.php | 4 | ||||
-rw-r--r-- | 14.0/apache/config/autoconfig.php | 4 | ||||
-rwxr-xr-x | 14.0/apache/entrypoint.sh | 4 | ||||
-rw-r--r-- | 14.0/fpm-alpine/config/autoconfig.php | 4 | ||||
-rwxr-xr-x | 14.0/fpm-alpine/entrypoint.sh | 4 | ||||
-rw-r--r-- | 14.0/fpm/config/autoconfig.php | 4 | ||||
-rwxr-xr-x | 14.0/fpm/entrypoint.sh | 4 | ||||
-rw-r--r-- | 15.0/apache/config/autoconfig.php | 4 | ||||
-rwxr-xr-x | 15.0/apache/entrypoint.sh | 4 | ||||
-rw-r--r-- | 15.0/fpm-alpine/config/autoconfig.php | 4 | ||||
-rwxr-xr-x | 15.0/fpm-alpine/entrypoint.sh | 4 | ||||
-rw-r--r-- | 15.0/fpm/config/autoconfig.php | 4 | ||||
-rwxr-xr-x | 15.0/fpm/entrypoint.sh | 4 | ||||
-rw-r--r-- | 16.0/apache/config/autoconfig.php | 4 | ||||
-rwxr-xr-x | 16.0/apache/entrypoint.sh | 4 | ||||
-rw-r--r-- | 16.0/fpm-alpine/config/autoconfig.php | 4 | ||||
-rwxr-xr-x | 16.0/fpm-alpine/entrypoint.sh | 4 | ||||
-rw-r--r-- | 16.0/fpm/config/autoconfig.php | 4 | ||||
-rwxr-xr-x | 16.0/fpm/entrypoint.sh | 4 | ||||
-rwxr-xr-x | docker-entrypoint.sh | 4 |
20 files changed, 40 insertions, 40 deletions
diff --git a/.config/autoconfig.php b/.config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/.config/autoconfig.php +++ b/.config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/14.0/apache/config/autoconfig.php b/14.0/apache/config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/14.0/apache/config/autoconfig.php +++ b/14.0/apache/config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/14.0/apache/entrypoint.sh b/14.0/apache/entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/14.0/apache/entrypoint.sh +++ b/14.0/apache/entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' diff --git a/14.0/fpm-alpine/config/autoconfig.php b/14.0/fpm-alpine/config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/14.0/fpm-alpine/config/autoconfig.php +++ b/14.0/fpm-alpine/config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/14.0/fpm-alpine/entrypoint.sh b/14.0/fpm-alpine/entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/14.0/fpm-alpine/entrypoint.sh +++ b/14.0/fpm-alpine/entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' diff --git a/14.0/fpm/config/autoconfig.php b/14.0/fpm/config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/14.0/fpm/config/autoconfig.php +++ b/14.0/fpm/config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/14.0/fpm/entrypoint.sh b/14.0/fpm/entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/14.0/fpm/entrypoint.sh +++ b/14.0/fpm/entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' diff --git a/15.0/apache/config/autoconfig.php b/15.0/apache/config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/15.0/apache/config/autoconfig.php +++ b/15.0/apache/config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/15.0/apache/entrypoint.sh b/15.0/apache/entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/15.0/apache/entrypoint.sh +++ b/15.0/apache/entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' diff --git a/15.0/fpm-alpine/config/autoconfig.php b/15.0/fpm-alpine/config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/15.0/fpm-alpine/config/autoconfig.php +++ b/15.0/fpm-alpine/config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/15.0/fpm-alpine/entrypoint.sh b/15.0/fpm-alpine/entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/15.0/fpm-alpine/entrypoint.sh +++ b/15.0/fpm-alpine/entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' diff --git a/15.0/fpm/config/autoconfig.php b/15.0/fpm/config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/15.0/fpm/config/autoconfig.php +++ b/15.0/fpm/config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/15.0/fpm/entrypoint.sh b/15.0/fpm/entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/15.0/fpm/entrypoint.sh +++ b/15.0/fpm/entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' diff --git a/16.0/apache/config/autoconfig.php b/16.0/apache/config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/16.0/apache/config/autoconfig.php +++ b/16.0/apache/config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/16.0/apache/entrypoint.sh b/16.0/apache/entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/16.0/apache/entrypoint.sh +++ b/16.0/apache/entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' diff --git a/16.0/fpm-alpine/config/autoconfig.php b/16.0/fpm-alpine/config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/16.0/fpm-alpine/config/autoconfig.php +++ b/16.0/fpm-alpine/config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/16.0/fpm-alpine/entrypoint.sh b/16.0/fpm-alpine/entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/16.0/fpm-alpine/entrypoint.sh +++ b/16.0/fpm-alpine/entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' diff --git a/16.0/fpm/config/autoconfig.php b/16.0/fpm/config/autoconfig.php index 85e02212..deeabe4e 100644 --- a/16.0/fpm/config/autoconfig.php +++ b/16.0/fpm/config/autoconfig.php @@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) { } if ($autoconfig_enabled) { - $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX') ?: ""; + if (getenv('NEXTCLOUD_TABLE_PREFIX')) { + $AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX'); + } $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; } diff --git a/16.0/fpm/entrypoint.sh b/16.0/fpm/entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/16.0/fpm/entrypoint.sh +++ b/16.0/fpm/entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 78bd0a8d..0be9d287 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -73,8 +73,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then # shellcheck disable=SC2016 install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' - else - install_options=$install_options' --database-table-prefix ""' fi if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then # shellcheck disable=SC2016 @@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then + if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 install_options=$install_options' --database-name "$SQLITE_DATABASE"' |