From be2dbbc8cf0b6daca35e63146d9780f45721a5d3 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 14 Mar 2022 01:40:29 +0100 Subject: [PATCH] creating the admin user before starting the service --- scripts/install | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 34fac40..119553d 100755 --- a/scripts/install +++ b/scripts/install @@ -330,6 +330,17 @@ yunohost service add $app --description="Gotosocial server" --log="/var/log/$app ### weren't enabled on old installs (be careful it'll override the existing ### service though so you should re-provide all relevant flags when doing so) +#================================================= +# CREATE ADMIN USER +#================================================= +ynh_script_progression --message="Creating admin user..." --time --weight=1 + +"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account create --username "$admin" --email "$email" --password "$password" + +"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account confirm --username "$admin" + +"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account promote --username "$admin" + #================================================= # START SYSTEMD SERVICE #================================================= @@ -366,17 +377,6 @@ ynh_script_progression --message="Reloading NGINX web server..." --time --weight ynh_systemd_action --service_name=nginx --action=reload -#================================================= -# CREATE ADMIN USER -#================================================= -ynh_script_progression --message="Creating admin user..." --time --weight=1 - -"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account create --username "$admin" --email "$email" --password "$password" - -"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account confirm --username "$admin" - -"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account promote --username "$admin" - #================================================= # END OF SCRIPT #=================================================