From 3378b2ed1815643e7772dd71e01fa513d61aeb1d Mon Sep 17 00:00:00 2001 From: Galettofraise Date: Thu, 24 Feb 2022 22:11:14 +0100 Subject: [PATCH] [fix] Add --purge --- scripts/remove | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/remove b/scripts/remove index 375fca1..a50dd19 100755 --- a/scripts/remove +++ b/scripts/remove @@ -63,6 +63,17 @@ 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 #=================================================