From 28e1f130a5257abe4bb26bb8eb92bf593379291d Mon Sep 17 00:00:00 2001 From: Galettofraise Date: Wed, 23 Feb 2022 17:28:57 +0100 Subject: [PATCH] [fix] Add --purge --- scripts/remove | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/remove b/scripts/remove index 985b798..77cb29d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -66,6 +66,16 @@ ynh_script_progression --message="Removing app main directory..." # Remove the app directory securely 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="$datadir" +fi #================================================= # REMOVE NGINX CONFIGURATION