1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gotosocial_ynh.git synced 2024-09-03 19:16:06 +02:00

creating the admin user before starting the service

This commit is contained in:
OniriCorpe 2022-03-14 01:40:29 +01:00
parent 71ca966297
commit be2dbbc8cf

View file

@ -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
#=================================================