1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minetest_ynh.git synced 2024-09-03 20:36:00 +02:00

Fixed upgrade and restore

This commit is contained in:
Rafi594 2019-10-22 18:40:18 +02:00
parent c47995c400
commit e2e7b9082d
2 changed files with 4 additions and 14 deletions

View file

@ -33,8 +33,7 @@ home_path=$(ynh_app_setting_get --app=$app --key=home_path)
#=================================================
ynh_print_info --message="Validating restoration parameters..."
ynh_webpath_available --domain=$domain \
|| ynh_die --message="Path not available: ${domain}"
ynh_webpath_register --app=$app --domain=$domain --path_url=/
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "

View file

@ -55,18 +55,6 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CHECK THE PATH
#=================================================
# Normalize the URL path syntax
# N.B. : this is for app installations before YunoHost 2.7
# where this value might be something like /foo/ or foo/
# instead of /foo ....
# If nobody installed your app before 2.7, then you may
# safely remove this line
path_url=$(ynh_normalize_url_path --path_url=/)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -74,6 +62,9 @@ path_url=$(ynh_normalize_url_path --path_url=/)
#=================================================
ynh_print_info --message="Upgrading source files..."
# Remove old install
ynh_secure_remove --file="$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"