Check for existence of data/mysql directory for database initialization

Filesystems, eg. ext4, mounted at `/bitnami/mariadb/data/` will contain
the `lost+found` directory causing the current database initialization
check to PASS.

Fixes #1
This commit is contained in:
Sameer Naik
2015-07-05 11:15:33 +05:30
parent 156dd76d74
commit aee4369bfc

View File

@@ -19,7 +19,7 @@ if [ "$1" = 'mysqld.bin' ]; then
mkdir -p $BITNAMI_APP_DIR/tmp
chown -R $BITNAMI_APP_USER:$BITNAMI_APP_USER $BITNAMI_APP_DIR/tmp || true
if [ ! "$(ls -A $BITNAMI_APP_VOL_PREFIX/data)" ]; then
if [ ! -d $BITNAMI_APP_VOL_PREFIX/data/mysql ]; then
set -- "$@" --init-file=/tmp/init_mysql.sql