Combine the chicken stock, parmesan rind and chicken thighs in a large saucepan. Bring to a boil, cover and simmer for 1 hour.
Remove the cooked chicken legs and shred the meat from the bones. Strain the chicken stock to discard any bits. Set aside.
In a new medium sized saucepan, brown the bacon and onion. Add the garlic, oregano, chilli flakes, potato, carrot and celery and cook gently for 5 minutes.
Add the chicken stock and chopped tomatoes to the pan. Bring to the boil, cover and simmer for 20 minutes.
Return the shredded chicken to the soup and cook for a further 5 minutes to warm.
Remove pot from the heat. Add a squeeze of lemon juice. Taste and season with salt and pepper as needed.
To serve: Divide chicken soup between bowls, drizzle with olive oil, add a large spoonful of pesto and sprinkle with grated parmesan.