From 6f0185685d2aacc20c7a1b849c3e3bcb315bb725 Mon Sep 17 00:00:00 2001 From: Galettofraise Date: Thu, 24 Feb 2022 22:06:57 +0100 Subject: [PATCH] [fix] Add --purge --- scripts/remove | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/remove b/scripts/remove index ea82bfa..e0751ac 100755 --- a/scripts/remove +++ b/scripts/remove @@ -76,6 +76,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="$data_path" +fi + #================================================= # REMOVE NGINX CONFIGURATION #=================================================