diff --git a/scripts/upgrade b/scripts/upgrade index 1feba54..5ecc164 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,6 +49,18 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." + +if ["yunohost app info minio | grep -oEi [0-9]{4}" == "2022"] +then + ynh_script_progression --message="Migration from Filesystem to Single-Node Single-Drive mode" +else + ynh_script_progression --message="No migration required" +fi + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -58,11 +70,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=2 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." - #================================================= # CREATE DEDICATED USER #=================================================