From 568764bdaf1c55ebb64c551d1e074c4ac9d6a776 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Sat, 20 Aug 2022 20:31:09 +0000 Subject: [PATCH] Implement --purge in the remove script --- scripts/remove | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/remove b/scripts/remove index 92c3940..abc28db 100644 --- a/scripts/remove +++ b/scripts/remove @@ -33,6 +33,12 @@ ynh_script_progression --message="Removing app main directory..." --weight=3 # Remove the app directory securely ynh_secure_remove --file="$final_path/_h5ai" +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_secure_remove --file="$final_path" +fi + #================================================= # REMOVE NGINX CONFIGURATION #=================================================