From a689129d2a1c1822e93472b53881af3179f3c732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sun, 21 Apr 2024 12:03:38 +0200 Subject: [PATCH] Remove log only if purge are enabled --- scripts/remove | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/remove b/scripts/remove index 1d0608e..2ca268e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -26,8 +26,10 @@ ynh_remove_logrotate ynh_remove_fail2ban_config -ynh_script_progression --message='Removing logs...' -ynh_secure_remove --file="/var/log/$app" +if [ "$YNH_APP_PURGE" -eq 1 ]; then + ynh_script_progression --message="Removing logs..." + ynh_secure_remove --file=/var/log/"$app" +fi #================================================= # END OF SCRIPT