From 24e2f6113cae8e55bf5b97cd7fbbed2526e7b62b Mon Sep 17 00:00:00 2001 From: Galettofraise Date: Wed, 23 Feb 2022 14:51:00 +0100 Subject: [PATCH] [fix] Add --purge --- scripts/remove | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/remove b/scripts/remove index af2403c..87ed43d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -64,6 +64,16 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config +#================================================ +# 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="/home/yunohost.app/$app" +fi #================================================= # REMOVE LOGROTATE CONFIGURATION