active-sites.env
additional-domains.env
301-domains.env
All just deleted sed i /{site.url}/d file
But what happens in the case of deleting either the site or domain:
site.url
When
development.site.url
exists on server? It would delete both sites/domains from the envs... and that would cause issues with things that check the envs in process... ssl, cloning, migration etc.
I have updated all the adding to these envs to use this instead on the add and check:
:site.url:
So when checking we can use the :
as the delimiter and not delete domains/sites from envs wrongly. Its a lot of small changes throughout due to the integrations everywhere in many files.
Also during this I found stuff where sometimes domains weren't deleted but the parent sites configs were... or where site-available is deleted but sites-enabled isn't... so only deleting enabled once available has been deleted... of course with add on domains they will still throw an error if the primary site common configs are still missing... but fewer.