From 2bc623728019c09ca4980908def2d058537c5529 Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 29 Dec 2022 18:41:43 +0100 Subject: [PATCH] Option to purge --- scripts/remove | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/remove b/scripts/remove index b391af8..acf4351 100755 --- a/scripts/remove +++ b/scripts/remove @@ -60,6 +60,17 @@ ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="$final_path" +#================================================= +# REMOVE CONFIGURATION +#================================================= + +# 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..." --weight=1 + ynh_secure_remove --file="/etc/$app" +fi + #================================================= # REMOVE DEPENDENCIES #=================================================