From 95da41ff0ce1d3ae51a8394bb8ef09a36615fae8 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 20 Aug 2014 13:27:58 +0200 Subject: [PATCH] Prise en charge de langue et app publique MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Choix de langue effectif. L'app peut être rendue publique. --- scripts/install | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 9827384..4446ab5 100644 --- a/scripts/install +++ b/scripts/install @@ -6,6 +6,7 @@ path=$2 admin=$3 user_pwd=$4 language=$5 +is_public=$6 # Check if admin exists sudo yunohost user list --json | grep -q "\"username\": \"$admin\"" @@ -75,11 +76,19 @@ echo "# Mise a jour de leed toutes les 2 heures." >> crontab_file echo "0 */2 * * * wget -q \"https://$domain$path/action.php?action=synchronize&code=$code_sync\"" >> crontab_file sudo crontab -u $admin crontab_file -# Retire l'autorisation d'accès de la page d'install. -sudo yunohost app setting leed skipped_uris -d -# Rend la page d'actualisation accessible pour le script cron. -sudo yunohost app setting leed skipped_uris -v "/action.php" -sudo yunohost app ssowatconf +# Réglage de la langue choisie +sudo sed -i "s@define('LANGUAGE','.*');@define('LANGUAGE','$language');@" $final_path/constant.php + +# Make app private if necessary +sudo yunohost app setting leed is_public -v "$is_public" +if [ "$is_public" = "No" ]; +then + # Retire l'autorisation d'accès de la page d'install. + sudo yunohost app setting leed skipped_uris -d + # Rend la page d'actualisation accessible pour le script cron. + sudo yunohost app setting leed skipped_uris -v "/action.php" + sudo yunohost app ssowatconf +fi # Clean hosts sudo sed -i '/yunoleed/d' /etc/hosts