From b1d6501aaff08a47d8b8ab12fac9de113dd9f1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sun, 21 Apr 2024 12:04:52 +0200 Subject: [PATCH] Remove log only if purge are enabled --- scripts/remove | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 56f5c74..f9f8cfc 100755 --- a/scripts/remove +++ b/scripts/remove @@ -34,10 +34,14 @@ ynh_remove_systemd_config --service=$app-coturn ynh_script_progression --message="Removing app main directory" --weight=2 ynh_secure_remove --file=$code_dir -ynh_secure_remove --file=/var/log/matrix-$app ynh_secure_remove --file=/etc/matrix-$app ynh_secure_remove --file=/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf +if [ "$YNH_APP_PURGE" -eq 1 ]; then + ynh_script_progression --message="Removing logs..." + ynh_secure_remove --file=/var/log/matrix-"$app" +fi + #================================================= # REMOVE NGINX CONFIGURATION #=================================================