From 9098d7955301064bd5adee653595df0c95048469 Mon Sep 17 00:00:00 2001 From: Galettofraise Date: Wed, 23 Feb 2022 18:59:14 +0100 Subject: [PATCH] [fix] Add --purge --- scripts/remove | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/remove b/scripts/remove index 36ce240..e368923 100644 --- a/scripts/remove +++ b/scripts/remove @@ -38,6 +38,18 @@ ynh_secure_remove --file="/var/log/$app" # Remove the app-specific logrotate config ynh_remove_logrotate + +#================================================= +# 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 config ynh_script_progression --message="Removing nginx configuration..." ynh_remove_nginx_config