From bca1f84313c78ac9933f909e69c100ce8a765fd5 Mon Sep 17 00:00:00 2001 From: Galettofraise Date: Wed, 23 Feb 2022 15:17:18 +0100 Subject: [PATCH] [fix] Add --purge --- scripts/remove | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/remove b/scripts/remove index f78ae0a..26fbddd 100644 --- a/scripts/remove +++ b/scripts/remove @@ -32,6 +32,16 @@ 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