From b9d548c4f1f3dbd713d9882954b9ead478a2b082 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 3 Jan 2019 19:57:09 +0100 Subject: [PATCH] Retrieving password reset at the user creation --- scripts/install | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 5f887ca..81015f7 100755 --- a/scripts/install +++ b/scripts/install @@ -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 deps.get ) ( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix ecto.migrate --force ) -# Add user -( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix pleroma.user new "$admin" "$admin_email" ) +# Add user and 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 new "$admin" "$admin_email" | tail -1 ) # Make user moderator ( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix pleroma.user set "$admin" --moderator ) # Make user 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