File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,6 @@ if [ ! -f ./config/settings.inc.php ] && [ ! -f ./app/config/parameters.php ] &&
6666 sed -ie " s/DirectoryIndex\ index.php\ index.html/DirectoryIndex\ docker_updt_ps_domains.php\ index.php\ index.html/g" $APACHE_CONFDIR /conf-available/docker-php.conf
6767 fi
6868
69- if [ $PS_ERASE_DB = 1 ]; then
70- echo " \n* Drop mysql database..." ;
71- echo " \n* Dropping existing database $DB_NAME ..."
72- mysql -h $DB_SERVER -P $DB_PORT -u $DB_USER -p$DB_PASSWD -e " drop database if exists $DB_NAME ;"
73- fi
74-
7569 if [ $PS_INSTALL_DB = 1 ]; then
7670 echo " \n* Create mysql database..." ;
7771 echo " \n* Creating database $DB_NAME ..."
@@ -86,11 +80,16 @@ if [ ! -f ./config/settings.inc.php ] && [ ! -f ./app/config/parameters.php ] &&
8680 fi
8781
8882 echo " \n* Launching the installer script..."
83+
84+ if [ $PS_ERASE_DB = 1 ]; then
85+ echo " \n* Existing database $DB_NAME will be droped"
86+ fi
87+
8988 runuser -g www-data -u www-data -- php -d memory_limit=-1 /var/www/html/$PS_FOLDER_INSTALL /index_cli.php \
9089 --domain=" $PS_DOMAIN " --db_server=$DB_SERVER :$DB_PORT --db_name=" $DB_NAME " --db_user=$DB_USER \
9190 --db_password=$DB_PASSWD --prefix=" $DB_PREFIX " --firstname=" John" --lastname=" Doe" \
9291 --password=" $ADMIN_PASSWD " --email=" $ADMIN_MAIL " --language=$PS_LANGUAGE --country=$PS_COUNTRY \
93- --all_languages=$PS_ALL_LANGUAGES --newsletter=0 --send_email=0 --ssl=$PS_ENABLE_SSL
92+ --all_languages=$PS_ALL_LANGUAGES --newsletter=0 --send_email=0 --ssl=$PS_ENABLE_SSL --db_clear= $PS_ERASE_DB
9493
9594 if [ $? -ne 0 ]; then
9695 echo ' warning: PrestaShop installation failed.'
You can’t perform that action at this time.
0 commit comments