From 6e57036c2f73bd60d56806c0b2b98756ba2d974f Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 24 Mar 2020 18:51:20 +0100 Subject: [PATCH] No more password --- manifest.json | 8 -------- scripts/install | 3 +-- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/manifest.json b/manifest.json index 0850b4b..c843332 100644 --- a/manifest.json +++ b/manifest.json @@ -49,14 +49,6 @@ "fr": "Administrateur du site (doit ĂȘtre un utilisateur YunoHost existant)" }, "example": "johndoe" - }, - { - "name": "password", - "type": "password", - "ask": { - "en": "Choose a password for the administrator", - "fr": "Choisissez un mot de passe pour l'administrateur" - } }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index e3b4368..65c22ee 100644 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN -password=$YNH_APP_ARG_PASSWORD is_public=$YNH_APP_ARG_IS_PUBLIC app=$YNH_APP_INSTANCE_NAME @@ -51,7 +50,6 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin -ynh_app_setting_set --app=$app --key=password --value=$password ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= @@ -128,6 +126,7 @@ chown -R "$app": "$final_path" ynh_script_progression --message="Configuring the application..." --weight=190 email=$(ynh_user_get_info $admin mail) +password=$(ynh_string_random --length=30) exec_as "$app" php$YNH_PHP_VERSION "$final_path/admin/cli/install.php" --wwwroot="https://$domain${path_url%/}" --dataroot=$data_path --dbtype='pgsql' --dbname=$db_name --dbuser=$db_name --dbpass=$db_pwd --adminuser=$admin --adminpass=$password --adminemail=$email --fullname="YunoHost" --shortname="YNH" --non-interactive --agree-license