From 41d7f8700d2ffb66148fb99dd19c7ea4afc6c197 Mon Sep 17 00:00:00 2001 From: anmol Date: Tue, 22 Jan 2019 16:56:49 +0530 Subject: [PATCH] Fix account creation --- scripts/install | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 7859db8..3680b03 100644 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN admin_mastodon=$YNH_APP_ARG_ADMIN admin_mastodon_mail=$(ynh_user_get_info $admin_mastodon 'mail') -admin_pass=$(ynh_string_random 24) language=$YNH_APP_ARG_LANGUAGE port_web=$(ynh_find_port 3000) port_stream=$(ynh_find_port 4000) @@ -234,17 +233,15 @@ systemctl start "$app-web.service" "$app-sidekiq.service" "$app-streaming.servic # Create user ( cd "$final_path/live" - su mastodon < acc.txt ) RAILS_ENV=production bin/tootctl accounts modify $admin_mastodon --confirm RAILS_ENV=production bin/tootctl accounts modify $admin_mastodon --role admin SETADMIN ) +admin_pass=$( cd $final_path/live && tail -1 acc.txt | head -1 | cut -c 15- ) +(cd $final_path/live && rm -f acc.txt) #================================================= # GENERIC FINALIZATION #=================================================