From 82b8648349d942d4fd82a1a1e74ea62080f25a65 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Sun, 27 Feb 2022 22:44:12 +0100 Subject: [PATCH] [fix] Remove core only --- scripts/remove | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/scripts/remove b/scripts/remove index 26fbddd..d582b42 100644 --- a/scripts/remove +++ b/scripts/remove @@ -32,16 +32,6 @@ ynh_remove_app_dependencies #================================================= ynh_script_progression --message="Removing app main directory..." --weight=1 ynh_secure_remove --file="$final_path" -#================================================= -# REMOVE DATA DIR -#================================================= - -# Remove the data directory if --purge option is used -if [ "${YNH_APP_PURGE:-0}" -eq 1 ] -then - ynh_script_progression --message="Removing app data directory..." --time --weight=1 - ynh_secure_remove --file="$data_path" -fi #================================================= # REMOVE NGINX CONFIGURATION @@ -58,7 +48,14 @@ ynh_remove_fpm_config #================================================= # SPECIFIC REMOVE #================================================= -ynh_secure_remove --file="$data_path" + +# Remove the data directory if --purge option is used +if [ "${REMOVE_CORE_ONLY:-0}" -eq 0 ] +then + ynh_script_progression --message="Removing app data directory..." --weight=1 + ynh_secure_remove --file="$data_path" +fi + #================================================= # GENERIC FINALIZATION