diff --git a/scripts/restore b/scripts/restore index 604d010..7875645 100644 --- a/scripts/restore +++ b/scripts/restore @@ -46,6 +46,14 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS +#================================================= +# 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" --groups="ssl-cert" + #================================================= # RESTORE ALL CONFIG AND DATA #================================================= @@ -56,14 +64,6 @@ chown -R $app:root /var/log/$app ynh_restore -#================================================= -# 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" --groups="ssl-cert" - #================================================= # RESTORE THE APP MAIN DIR #=================================================