From 46b9670a362512e2e18e212b93cec4f34163e78e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 08:47:11 +0100 Subject: [PATCH] Fix --- scripts/restore | 16 ++++++++-------- scripts/upgrade | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/restore b/scripts/restore index f77499f..80ee84f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -49,6 +49,14 @@ ynh_script_progression --message="Restoring the NGINX configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir=$final_path + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -63,14 +71,6 @@ ynh_script_progression --message="Restoring Navidrome config directory..." --wei ynh_restore_file --origin_path="/var/lib/$app" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # RESTORE USER RIGHTS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d9085d8..6e42272 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,6 +64,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action=stop --log_path=systemd +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir=$final_path + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -105,14 +113,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=8 ynh_install_app_dependencies $pkg_dependencies -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # SETUP SYSTEMD #=================================================