Avoid empty table prefix

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
This commit is contained in:
J0WI 2019-06-22 18:22:15 +02:00
parent df048873ab
commit a87f914de3
20 changed files with 40 additions and 40 deletions

View File

@ -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";
}

View File

@ -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";
}

View File

@ -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"'

View File

@ -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";
}

View File

@ -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"'

View File

@ -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";
}

View File

@ -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"'

View File

@ -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";
}

View File

@ -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"'

View File

@ -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";
}

View File

@ -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"'

View File

@ -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";
}

View File

@ -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"'

View File

@ -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";
}

View File

@ -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"'

View File

@ -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";
}

View File

@ -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"'

View File

@ -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";
}

View File

@ -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"'

View File

@ -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"'