mirror of
https://github.com/YunoHost-Apps/prestashop_ynh.git
synced 2024-09-03 20:06:39 +02:00
Ajout de l'installation automatique avec index_cli.php
This commit is contained in:
parent
8d44654936
commit
acdf3d2224
1 changed files with 25 additions and 1 deletions
|
@ -56,6 +56,12 @@ ynh_app_setting_set $app language $language
|
||||||
ynh_app_setting_set $app db_pwd $db_pwd
|
ynh_app_setting_set $app db_pwd $db_pwd
|
||||||
ynh_app_setting_set $app email $email
|
ynh_app_setting_set $app email $email
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# Check password strength
|
||||||
|
#=================================================
|
||||||
|
[[ ${#db_pwd} -gt 5 ]] || ynh_die \
|
||||||
|
"The password is too weak, it must be longer than 5 characters"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A SQL BDD
|
# CREATE A SQL BDD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -75,12 +81,30 @@ sudo mkdir "$final_path"
|
||||||
sudo chown -R www-data: $final_path
|
sudo chown -R www-data: $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# Download, check and unpack source
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set $app final_path $final_path
|
ynh_app_setting_set $app final_path $final_path
|
||||||
SETUP_SOURCE "prestashop_1.7.0.5.zip" # Télécharge la source, décompresse et copie dans $final_path
|
SETUP_SOURCE "prestashop_1.7.0.5.zip" # Télécharge la source, décompresse et copie dans $final_path
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# Installation de Prestashop
|
||||||
|
#=================================================
|
||||||
|
pushd $final_path/install/
|
||||||
|
sudo php index_cli.php install \
|
||||||
|
--db_server=localhost \
|
||||||
|
--db_user=$db_user \
|
||||||
|
--db_password=$db_pass \
|
||||||
|
--db_name=$db_name \
|
||||||
|
--db_driver=amysqli \
|
||||||
|
--db_port=3306 \
|
||||||
|
--lastname=$db_user \
|
||||||
|
--password=$db_pwd \
|
||||||
|
--email=$email \
|
||||||
|
--domain=$domain \
|
||||||
|
--prefix=_ps_
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Set /etc/hosts
|
# Set /etc/hosts
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue