From f3e9a0b2096ef31325c3741f55667de9a7199cdb Mon Sep 17 00:00:00 2001 From: mbugeia Date: Mon, 20 Oct 2014 01:39:33 +0200 Subject: [PATCH 1/3] Added Leed Market option --- manifest.json | 9 +++++++++ scripts/install | 9 +++++++++ 2 files changed, 18 insertions(+) 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..e4be755 100644 --- a/scripts/install +++ b/scripts/install @@ -85,6 +85,15 @@ sed -i "s@__PATH__@$path@g" ../conf/cron_leed sed -i "s@__CODESYNC__@$code_sync@g" ../conf/cron_leed sudo cp ../conf/cron_leed /etc/cron.d/leed +# Activate Leed Market if necessary +sudo yunohost app setting leed market -v "$market" +if [ "$market" = "Yes" ]; +then + rm -R $final_path/plugins + git clone https://github.com/ldleman/Leed-market.git $final_path/plugins + sudo chown -R www-data: $final_path/plugins +fi + # Make app private if necessary sudo yunohost app setting leed is_public -v "$is_public" if [ "$is_public" = "No" ]; From 4918945f1b962b194377d121b67bf82cb85cc771 Mon Sep 17 00:00:00 2001 From: mbugeia Date: Mon, 20 Oct 2014 01:54:46 +0200 Subject: [PATCH 2/3] Fix Leed Market --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index e4be755..60e13ef 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\"" From 0449ff8e8b4ec335df59ee3f704ca4071c9fb0bf Mon Sep 17 00:00:00 2001 From: mbugeia Date: Mon, 20 Oct 2014 02:10:52 +0200 Subject: [PATCH 3/3] Fix Leed Market --- scripts/install | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index 60e13ef..293dc5d 100644 --- a/scripts/install +++ b/scripts/install @@ -68,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 @@ -86,15 +94,6 @@ sed -i "s@__PATH__@$path@g" ../conf/cron_leed sed -i "s@__CODESYNC__@$code_sync@g" ../conf/cron_leed sudo cp ../conf/cron_leed /etc/cron.d/leed -# Activate Leed Market if necessary -sudo yunohost app setting leed market -v "$market" -if [ "$market" = "Yes" ]; -then - rm -R $final_path/plugins - git clone https://github.com/ldleman/Leed-market.git $final_path/plugins - sudo chown -R www-data: $final_path/plugins -fi - # Make app private if necessary sudo yunohost app setting leed is_public -v "$is_public" if [ "$is_public" = "No" ];