diff --git a/README.template b/README.template index b28fa1c..83b02f8 100644 --- a/README.template +++ b/README.template @@ -139,7 +139,7 @@ It is possible to execute `*.sh`, `*.sql` and/or `*.php` custom file at the end ``` \docker-init.d |- custom_script.sql -|- custom_script.php // You should create your own module instead of doing this. +|- custom_script.php |- custom_script.sh ``` diff --git a/docker-init.php b/docker-init.php index e628648..876133d 100644 --- a/docker-init.php +++ b/docker-init.php @@ -38,15 +38,17 @@ if (!empty(getenv('DOLI_ENABLE_MODULES'))) { printf("Activating module ".$mod." ..."); try { $res = activateModule('mod' . $mod); + if ($res < 0) { - print(" FAILED. Unable to find module. Be sure to check the case\n"); + print(" FAILED. Unable to load module. Be sure to check the case\n"); } else { printf(" OK\n"); } } catch (Throwable $t) { - print(" FAILED. Unable to find module. Be sure to check the case\n"); + print(" FAILED. Unable to load module. Be sure to check the case\n"); } + } } diff --git a/docker-run.sh b/docker-run.sh index e2bb747..9196c13 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -185,7 +185,6 @@ function initializeDatabase() sed -i 's/--.*//g;' ${file} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${file} > /dev/null 2>&1 elif [ "$isExec" == "PHP" ] ; then - # You should create your own module and activate it with DOLI_ENABLE_MODULES instead of doing that php $file elif [ "$isExec" == "SH" ] ; then /bin/bash $file