1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/leed_ynh.git synced 2024-09-03 19:26:32 +02:00

Merge pull request #3 from mbugeia/master

Ajout d'une option pour activer le Leed Market
This commit is contained in:
Maniack Crudelis 2014-10-20 13:26:32 +02:00
commit 20214ab5ff
2 changed files with 19 additions and 1 deletions

View file

@ -56,6 +56,15 @@
"choices" : ["en", "fr", "es"],
"default" : "en"
},
{
"name": "market",
"ask": {
"en": "Do you want to activate the Leed Market?",
"fr": "Voulez-vous activer le Leed Market ?"
},
"choices": ["Yes", "No"],
"default": "No"
},
{
"name": "is_public",
"ask": {

View file

@ -6,7 +6,8 @@ path=$2
admin=$3
user_pwd=$4
language=$5
is_public=$6
market=$6
is_public=$7
# Check if admin exists
sudo yunohost user list --json | grep -q "\"username\": \"$admin\""
@ -67,6 +68,14 @@ echo "127.0.0.1 $domain #yunoleed" | sudo tee -a /etc/hosts
sleep 1
curl -k --data "install_changeLngLeed=$language&root=$domain$path&mysqlHost=localhost&mysqlLogin=$db_user&mysqlMdp=$db_pwd&mysqlBase=$db_user&mysqlPrefix=leed_&login=$admin&password=$user_pwd" https://$domain$path/install.php?installButton > /dev/null
# Activate Leed Market if necessary
sudo yunohost app setting leed market -v "$market"
if [ "$market" = "Yes" ];
then
sudo rm -R $final_path/plugins
sudo git clone https://github.com/ldleman/Leed-market.git $final_path/plugins
fi
# Files owned by root, www-data can just read
sudo mkdir $final_path/cache
sudo find $final_path -type f | xargs sudo chmod 644