1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/couchpotato_ynh.git synced 2024-09-03 18:16:22 +02:00

Fix upgrade

This commit is contained in:
yalh76 2020-06-24 02:59:53 +02:00
parent eeac9ff671
commit 4a750a207a

View file

@ -49,11 +49,11 @@ elif [ "$is_public" = "No" ]; then
is_public=0
fi
# Cancel upgrade if the version is too old
if [[ -n $(ynh_app_setting_get $app method) ]]; then
if [[ -n $(ynh_app_setting_get $app method) ]]; then
ynh_die "Your current version is too old and cannot be upgraded.\
If you had a local install, please remove the app and reinstall it.\
If you had a remote install, please remove the app and install redirect_ynh for this purpose instead."
fi
fi
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
@ -61,6 +61,12 @@ if [ -z "$final_path" ]; then
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
# If app_data_dir doesn't exist, create it
if [ -z "$app_data_dir" ]; then
app_data_dir=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=app_data_dir --value=$app_data_dir
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================