1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

Ask for admin password during installation

Better than assigning a random password
This commit is contained in:
tituspijean 2021-03-21 15:04:44 +01:00
parent 8fe64ae10e
commit 26cb5d256b
2 changed files with 10 additions and 1 deletions

View file

@ -49,6 +49,15 @@
"type": "user", "type": "user",
"example": "johndoe" "example": "johndoe"
}, },
{
"name": "password",
"type": "password",
"help": {
"en": "Choose your password. It will be useful if logging in from YunoHost fails or is disrupted.",
"fr": "Choisissez votre mot de passe. Il sera utile si la connexion via YunoHost échoue ou est perturbée."
},
"example": "Choose a password"
},
{ {
"name": "title", "name": "title",
"type": "string", "type": "string",

View file

@ -30,11 +30,11 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
admin_pwd=$YNH_APP_ARG_PASSWORD
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE language=$YNH_APP_ARG_LANGUAGE
title=$YNH_APP_ARG_TITLE title=$YNH_APP_ARG_TITLE
admin_pwd=$(ynh_string_random --length=8)
admin_mail=$(ynh_user_get_info --username=$admin --key=mail) admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME