mirror of
https://github.com/YunoHost-Apps/aeneria_ynh.git
synced 2024-09-03 18:06:15 +02:00
rename mail and default_password to admin_mail and admin_default_password
This commit is contained in:
parent
66ad858105
commit
05f1048573
5 changed files with 18 additions and 16 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
You can access it here: <__PATH__>
|
||||
|
||||
Your login is: `__MAIL__`
|
||||
Your password is: `__DEFAULT_PASSWORD__`
|
||||
Your login is: `__ADMIN_MAIL__`
|
||||
Your password is: `__ADMIN_DEFAULT_PASSWORD__`
|
||||
|
||||
Please change this generated default password in the æneria settings.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Vous pouvez y accéder à cette adresse : <__PATH__>
|
||||
|
||||
Votre identifiant : `__MAIL__`
|
||||
Votre mot de passe : `__DEFAULT_PASSWORD__`
|
||||
Votre identifiant : `__ADMIN_MAIL__`
|
||||
Votre mot de passe : `__ADMIN_DEFAULT_PASSWORD__`
|
||||
|
||||
Merci de changer ce mot de passe généré par défaut dans les paramètres de æneria.
|
||||
|
|
|
@ -59,11 +59,12 @@ ynh_script_progression --message="Installing aeneria..." --weight=1
|
|||
pushd "$install_dir"
|
||||
ynh_exec_as "$app" "php$phpversion" bin/console aeneria:install "$app" -n
|
||||
# Create admin user
|
||||
mail=$(ynh_user_get_info --username="$admin" --key='mail')
|
||||
default_password="$(ynh_string_random)"
|
||||
ynh_app_setting_set --app="$app" --key=default_password --value="$default_password"
|
||||
ynh_exec_as "$app" "php$phpversion" bin/console aeneria:user:add "$mail" "$default_password" -n
|
||||
ynh_exec_as "$app" "php$phpversion" bin/console aeneria:user:grant "$mail"
|
||||
admin_mail=$(ynh_user_get_info --username="$admin" --key='mail')
|
||||
ynh_app_setting_set --app="$app" --key=admin_mail --value="$admin_mail"
|
||||
admin_default_password="$(ynh_string_random)"
|
||||
ynh_app_setting_set --app="$app" --key=admin_default_password --value="$admin_default_password"
|
||||
ynh_exec_as "$app" "php$phpversion" bin/console aeneria:user:add "$admin_mail" "$admin_default_password" -n
|
||||
ynh_exec_as "$app" "php$phpversion" bin/console aeneria:user:grant "$admin_mail"
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -18,7 +18,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PSQL DATABASE
|
||||
|
|
|
@ -95,14 +95,15 @@ pushd "$install_dir"
|
|||
ynh_exec_as "$app" "php$phpversion" bin/console doctrine:migrations:migrate -n
|
||||
|
||||
# Set admin user
|
||||
mail=$(ynh_user_get_info --username="$admin" --key='mail')
|
||||
user_exists=$(ynh_exec_as "$app" "php$phpversion" bin/console aeneria:user:exist "$mail")
|
||||
admin_mail=$(ynh_user_get_info --username="$admin" --key='mail')
|
||||
ynh_app_setting_set --app="$app" --key=admin_mail --value="$admin_mail"
|
||||
user_exists=$(ynh_exec_as "$app" "php$phpversion" bin/console aeneria:user:exist "$admin_mail")
|
||||
if [ "$user_exists" -eq 0 ]
|
||||
then
|
||||
default_password=$(ynh_string_random)
|
||||
ynh_app_setting_set --app="$app" --key=default_password --value="$default_password"
|
||||
ynh_exec_as "$app" "php$phpversion" bin/console aeneria:user:add "$mail" "$default_password" -n
|
||||
ynh_print_info --message="An æneria user as been created. Your login: $mail Your password: $default_password"
|
||||
admin_default_password=$(ynh_string_random)
|
||||
ynh_app_setting_set --app="$app" --key=admin_default_password --value="$admin_default_password"
|
||||
ynh_exec_as "$app" "php$phpversion" bin/console aeneria:user:add "$admin_mail" "$admin_default_password" -n
|
||||
ynh_print_info --message="An æneria user as been created. Your login: $admin_mail Your password: $admin_default_password"
|
||||
fi
|
||||
|
||||
# Regenerate RSA keys
|
||||
|
|
Loading…
Add table
Reference in a new issue