From c1d8ce077c8c29d083e920e4947c0075d011f1c6 Mon Sep 17 00:00:00 2001 From: Florent Date: Sat, 11 Nov 2023 14:44:33 +0100 Subject: [PATCH] WIP for upgrade --- scripts/upgrade | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f9a26f0..c029e62 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,21 +9,8 @@ source _common.sh source /usr/share/yunohost/helpers -# Settings are automatically loaded as bash variables -# in every app script context, therefore typically these will exist: -# - $domain -# - $path -# - $language -# - $install_dir -# - $port -# ... - redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) -# In the context of upgrade, -# - resources are automatically provisioned / updated / deleted (depending on existing resources) -# - a safety backup is automatically created by the core and will be restored if the upgrade fails - ### This helper will compare the version of the currently installed app and the version of the upstream package. ### $upgrade_type can have 2 different values ### - UPGRADE_APP if the upstream app version has changed @@ -37,25 +24,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -#ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# -# N.B. : the following setting migration snippets are provided as *EXAMPLES* -# of what you may want to do in some cases (e.g. a setting was not defined on -# some legacy installs and you therefore want to initiaze stuff during upgrade) -# - -# If db_name doesn't exist, create it -#if [ -z "$db_name" ]; then -# db_name=$(ynh_sanitize_dbid --db_name=$app) -# ynh_app_setting_set --app=$app --key=db_name --value=$db_name -#fi - -# If install_dir doesn't exist, create it -#if [ -z "$install_dir" ]; then -# install_dir=/var/www/$app -# ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir -#fi #================================================= # STOP SYSTEMD SERVICE