From fb20f2e9b6610a3ec09559a0b973477ee2341e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sun, 21 Apr 2024 12:04:09 +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 5752a1e..8d8c063 100644 --- a/scripts/remove +++ b/scripts/remove @@ -33,8 +33,10 @@ ynh_remove_nginx_config #================================================= ynh_script_progression --message="Removing various files..." --weight=1 -# Remove the log files -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