From 26f79227e3f716c5a4f53237fc786615c81aab64 Mon Sep 17 00:00:00 2001 From: Emmanuel Averty Date: Wed, 15 Nov 2023 11:29:57 +0100 Subject: [PATCH] fix: move forgejo api user creation after installing forgejo --- scripts/upgrade | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index dbada2c..bf9ed56 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,13 +48,6 @@ popd # Update login source synchronization flag (1.19.3-0~ynh3) enable_login_source_sync -if [ -z ${forgejo_api_user:-} ]; then - create_forgejo_api_user -fi - -# Update users login source (1.19.3-0~ynh3) -set_users_login_source - # forgejo home directory has changed (yunohost packaging v2) # .ssh directory should move from old home dir (data_dir) to new one # (/var/www/$app is the default value for home in resources.system_user) @@ -155,6 +148,12 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # Synchronize users (backward compatibility 1.19.3-0~ynh3) #================================================= +if [ -z ${forgejo_api_user:-} ]; then + create_forgejo_api_user +fi + +set_users_login_source + synchronize_users #=================================================