From 889c13e30054bfd0f0ec4ac8c515b7983c12c899 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 3 Oct 2021 11:24:09 +0200 Subject: [PATCH] Update remove --- scripts/remove | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/remove b/scripts/remove index cbb87ee..4aaf73b 100755 --- a/scripts/remove +++ b/scripts/remove @@ -59,8 +59,16 @@ ynh_script_progression --message="Removing $app main directory..." --weight=6 # Remove the app directory securely ynh_secure_remove --file="$final_path" -# We don't delete this dir as it is marked as is-big -# ynh_secure_remove --file="$data_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..." --weight=1 + ynh_secure_remove --file="$data_path" +fi #================================================= # REMOVE NGINX CONFIGURATION