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