#!/bin/bash migration311=$(yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311" --output-as plain --quiet) mig_type=$(yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311_type" --output-as plain --quiet) mig_parm=$(yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311_parm" --output-as plain --quiet) if [[ "$migration311" = "two_steps_upgrade_3.0to3.1-needed" ]] then yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311" --value="two_steps_upgrade_3.0to3.1-progress" --quiet if [ "$mig_type" = "file" ] then yunohost app upgrade "$YNH_APP_INSTANCE_NAME" --file "$mig_parm" else yunohost app upgrade "$YNH_APP_INSTANCE_NAME" --url "$mig_parm" fi yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311" --value="two_steps_upgrade_3.0to3.1-done" --quiet fi