Skip to content

Commit 22bc912

Browse files
committed
docker-run.sh: fix the script
1 parent c478c41 commit 22bc912

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

docker-run.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,6 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
5959
\$dolibarr_main_url_root_alt='/custom';
6060
\$dolibarr_main_document_root_alt='/var/www/html/custom';
6161
\$dolibarr_main_data_root='/var/www/documents';
62-
EOF
63-
64-
# Check if SSL is enabled for the database
65-
if [[ "${DOLI_DB_SSL}" == "true" && "${DOLI_DB_TYPE}" == "mysqli"]]; then
66-
echo "\$dolibarr_main_db_host='ssl://${DOLI_DB_HOST}';" >> /var/www/html/conf/conf.php
67-
else
68-
echo "\$dolibarr_main_db_host='${DOLI_DB_HOST}';" >> /var/www/html/conf/conf.php
69-
fi
70-
71-
cat > /var/www/html/conf/conf.php << EOF
7262
\$dolibarr_main_db_port='${DOLI_DB_HOST_PORT}';
7363
\$dolibarr_main_db_name='${DOLI_DB_NAME}';
7464
\$dolibarr_main_db_prefix='llx_';
@@ -79,6 +69,12 @@ cat > /var/www/html/conf/conf.php << EOF
7969
\$dolibarr_main_prod=${DOLI_PROD};
8070
EOF
8171

72+
# Check if SSL is enabled for the database
73+
if [[ "${DOLI_DB_SSL}" == "true" && "${DOLI_DB_TYPE}" == "mysqli" ]]; then
74+
echo "\$dolibarr_main_db_host='ssl://${DOLI_DB_HOST}';" >> /var/www/html/conf/conf.php
75+
else
76+
echo "\$dolibarr_main_db_host='${DOLI_DB_HOST}';" >> /var/www/html/conf/conf.php
77+
fi
8278

8379
if [[ ! -z ${DOLI_INSTANCE_UNIQUE_ID} ]]; then
8480
echo "[INIT] => update Dolibarr Config with instance unique id ..."

0 commit comments

Comments
 (0)