diff --git a/scripts/upgrade b/scripts/upgrade index 94e197d..fcdce6f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -45,7 +45,10 @@ if $(ynh_compare_current_package_version --comparison le --version "2.6.2~ynh4") then # Purge old root directory's contents ynh_script_progression --message="Removing old files..." --weight=2 - ynh_secure_remove --file="$install_dir" + mkdir "$install_dir/release" + chmod -R o-rwx "$install_dir/release" + chown -R $app:www-data "$install_dir/release" + mv -f $install_dir/* $install_dir/.[!.]* $install_dir/release fi if [[ "$upgrade_type" == "UPGRADE_APP" || $(ynh_compare_current_package_version --comparison le --version "2.6.2~ynh4") ]]; then