0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2024-11-18 02:56:42 +01:00

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) { 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"; $AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
} }

View file

@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) {
} }
if ($autoconfig_enabled) { 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"; $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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' install_options=$install_options' --database-name "$SQLITE_DATABASE"'

View file

@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) {
} }
if ($autoconfig_enabled) { 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"; $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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' install_options=$install_options' --database-name "$SQLITE_DATABASE"'

View file

@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) {
} }
if ($autoconfig_enabled) { 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"; $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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' install_options=$install_options' --database-name "$SQLITE_DATABASE"'

View file

@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) {
} }
if ($autoconfig_enabled) { 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"; $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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' install_options=$install_options' --database-name "$SQLITE_DATABASE"'

View file

@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) {
} }
if ($autoconfig_enabled) { 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"; $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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' install_options=$install_options' --database-name "$SQLITE_DATABASE"'

View file

@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) {
} }
if ($autoconfig_enabled) { 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"; $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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' install_options=$install_options' --database-name "$SQLITE_DATABASE"'

View file

@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) {
} }
if ($autoconfig_enabled) { 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"; $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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' install_options=$install_options' --database-name "$SQLITE_DATABASE"'

View file

@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) {
} }
if ($autoconfig_enabled) { 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"; $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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' install_options=$install_options' --database-name "$SQLITE_DATABASE"'

View file

@ -23,7 +23,9 @@ if (getenv('SQLITE_DATABASE')) {
} }
if ($autoconfig_enabled) { 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"; $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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' 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 if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"' install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
else
install_options=$install_options' --database-table-prefix ""'
fi fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -82,7 +80,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi fi
install=false install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database" echo "Installing with SQLite database"
# shellcheck disable=SC2016 # shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"' install_options=$install_options' --database-name "$SQLITE_DATABASE"'