Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Active custom modules - update
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaadasch committed May 17, 2024
1 parent 3ae85ef commit b7492ad
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,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
```
Expand Down
6 changes: 4 additions & 2 deletions images/15.0.3-php7.4/docker-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@
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");
}

}
}
1 change: 0 additions & 1 deletion images/15.0.3-php7.4/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions images/16.0.5-php8.1/docker-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@
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");
}

}
}
1 change: 0 additions & 1 deletion images/16.0.5-php8.1/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions images/17.0.4-php8.1/docker-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@
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");
}

}
}
1 change: 0 additions & 1 deletion images/17.0.4-php8.1/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions images/18.0.5-php8.1/docker-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@
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");
}

}
}
1 change: 0 additions & 1 deletion images/18.0.5-php8.1/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions images/19.0.2-php8.2/docker-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@
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");
}

}
}
1 change: 0 additions & 1 deletion images/19.0.2-php8.2/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions images/develop/docker-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@
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");
}

}
}
1 change: 0 additions & 1 deletion images/develop/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b7492ad

Please sign in to comment.