diff --git a/scripts/upgrade b/scripts/upgrade index afe1eaa..a7100cb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,6 +74,10 @@ ynh_system_user_create --username=$app --home_dir="$final_path" # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +# Void and recreate final_path +ynh_secure_remove --file="$final_path" +ynh_exec_warn_less mkdir "$final_path" + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 @@ -82,10 +86,6 @@ then ynh_setup_source --dest_dir="$final_path" --keep="config.php" fi -# Void and recreate final_path -ynh_secure_remove --file="$final_path" -ynh_exec_warn_less mkdir "$final_path" - chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path"