From 3de168d103c2b82b53c2be25212fd8977d7b3053 Mon Sep 17 00:00:00 2001 From: TitusPiJean Date: Wed, 18 Jan 2017 20:45:45 +0100 Subject: [PATCH] Removing api key creation and adding password length requirement --- manifest.json | 8 ++++---- scripts/install | 12 +++--------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/manifest.json b/manifest.json index 7d85065..d87b3fc 100644 --- a/manifest.json +++ b/manifest.json @@ -61,11 +61,11 @@ "name": "adminpass", "type": "password", "ask": { - "en": "Put your password", - "fr": "Insérez votre mot de passe", - "de": "Einfügen eure Passwort" + "en": "Put your password (8 characters minimum)", + "fr": "Insérez votre mot de passe (8 caractères minimum)", + "de": "Einfügen eure Passwort (mindestens 8 Zeichen)" }, - "example": "******", + "example": "********", "optional": true }, { diff --git a/scripts/install b/scripts/install index 7808858..066a2a7 100644 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,8 @@ admin=$YNH_APP_ARG_ADMIN adminpass=$YNH_APP_ARG_ADMINPASS title=$YNH_APP_ARG_TITLE is_public=$YNH_APP_ARG_IS_PUBLIC -final_path=/var/www/$app +www_path=/var/www +final_path=$www_path/$app # Source YunoHost helpers source /usr/share/yunohost/helpers @@ -75,8 +76,7 @@ fi ### Install flarum cwd=$(pwd) sudo su - www-data -s /bin/bash -c "mkdir -p $tmp/$app && cd $tmp/$app && php -d memory_limit=-1 /usr/local/bin/composer create-project flarum/flarum . --stability=beta" -sudo mkdir $final_path -sudo cp -Rfv $tmp/$app $final_path/ +sudo cp -Rf $tmp/$app $www_path/ sudo chown -R www-data:www-data $final_path cd $cwd sudo rm -rf $tmp @@ -131,10 +131,4 @@ sed -i "s@YNH_FORUM_TITLE@$title@g" ../sources/configuration.yml sudo cp ../sources/configuration.yml $final_path sudo su - www-data -s /bin/bash -c "cd $final_path && php -d memory_limit=-1 flarum install -f configuration.yml" sudo rm $final_path/configuration.yml - -# Generate and add root token for user creation and deletion -roottoken=$(ynh_string_random 40) -rootsql="INSERT INTO api_keys VALUES ('"$roottoken"')" -ynh_mysql_execute_as_root "$rootsql" $dbname -ynh_app_setting_set "$app" root_token "$roottoken" fi