1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pleroma_ynh.git synced 2024-09-03 20:15:59 +02:00

Retrieving password reset at the user creation

This commit is contained in:
yalh76 2019-01-03 19:57:09 +01:00
parent 35787f57e0
commit b737dffdf3

View file

@ -200,14 +200,12 @@ chown -R "$app":"$app" "$final_path"
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix local.rebar --force ) ( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix local.rebar --force )
( cd $final_path/$app && sudo -u "$app" mix deps.get ) ( cd $final_path/$app && sudo -u "$app" mix deps.get )
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix ecto.migrate --force ) ( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix ecto.migrate --force )
# Add user # Add user and retrieve a password reset link that you can then send to the user
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix pleroma.user new "$admin" "$admin_email" ) admin_pass_reset_url=$( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix pleroma.user new "$admin" "$admin_email" | tail -1 )
# Make user moderator # Make user moderator
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix pleroma.user set "$admin" --moderator ) ( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix pleroma.user set "$admin" --moderator )
# Make user admin # Make user admin
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix pleroma.user set "$admin" --admin ) ( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix pleroma.user set "$admin" --admin )
# Retrieve a password reset link that you can then send to the user
admin_pass_reset_url=$( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix pleroma.user reset_password "$admin" | tail -1 )
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT