From 756e978a97ae315588cb96302bbdf55e555419d0 Mon Sep 17 00:00:00 2001 From: Galette Date: Thu, 24 Feb 2022 21:54:43 +0100 Subject: [PATCH] [fix] Add --purge --- scripts/remove | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/remove b/scripts/remove index e2cbdf3..becdfc9 100755 --- a/scripts/remove +++ b/scripts/remove @@ -91,6 +91,17 @@ ynh_script_progression --message="Removing app data directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="$data_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="$calibre_dir" +fi + #================================================= # REMOVE NGINX CONFIGURATION #=================================================