From 64bdedb706d51f0bf40a31d805b18fdc411a3092 Mon Sep 17 00:00:00 2001 From: Galettofraise Date: Wed, 23 Feb 2022 18:46:59 +0100 Subject: [PATCH] [fix] Add --purge --- scripts/remove | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/remove b/scripts/remove index 1b12a17..61f2713 100644 --- a/scripts/remove +++ b/scripts/remove @@ -73,6 +73,12 @@ ynh_script_progression --message="Removing app data directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="/home/yunohost.app/$app" +# 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 THE CRON FILE #=================================================