diff --git a/manifest.json b/manifest.json index 70b1079..a4efd6f 100644 --- a/manifest.json +++ b/manifest.json @@ -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": { diff --git a/scripts/install b/scripts/install index 5ab7380..293dc5d 100644 --- a/scripts/install +++ b/scripts/install @@ -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