From 6f0185685d2aacc20c7a1b849c3e3bcb315bb725 Mon Sep 17 00:00:00 2001 From: Galettofraise Date: Thu, 24 Feb 2022 22:06:57 +0100 Subject: [PATCH 1/4] [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 #================================================= From bc0a80a4c5c2239a58df90c0a8a50b2efad30ecb Mon Sep 17 00:00:00 2001 From: Galettofraise Date: Thu, 24 Feb 2022 22:16:06 +0100 Subject: [PATCH 2/4] [fix] Add --purge --- scripts/remove | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/remove b/scripts/remove index e0751ac..4ba83cd 100755 --- a/scripts/remove +++ b/scripts/remove @@ -73,9 +73,6 @@ ynh_secure_remove --file="$final_path" #================================================= ynh_script_progression --message="Removing app data directory..." --weight=1 -# Remove the app directory securely -ynh_secure_remove --file="$data_path" - #================================================= # REMOVE DATA DIR #================================================= From acf4c1cd0907be33d83a3f6267733eefd0e43b1d Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Thu, 24 Feb 2022 17:39:04 -0500 Subject: [PATCH 3/4] Update remove --- scripts/remove | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/remove b/scripts/remove index 4ba83cd..8b26c53 100755 --- a/scripts/remove +++ b/scripts/remove @@ -68,11 +68,6 @@ ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="$final_path" -#================================================= -# REMOVE APP DATA DIR -#================================================= -ynh_script_progression --message="Removing app data directory..." --weight=1 - #================================================= # REMOVE DATA DIR #================================================= From d62514ad9ec3f46289d079ee8c8204149a8fe356 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Sun, 27 Feb 2022 21:17:20 +0100 Subject: [PATCH 4/4] [fix] Typo --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 8b26c53..4a979d7 100755 --- a/scripts/remove +++ b/scripts/remove @@ -43,7 +43,7 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config -I + #================================================= # REMOVE THE MYSQL DATABASE #=================================================