acme-tiny
acme-tiny copied to clipboard
Remove failed challenges.
If a renewal fails, than the challenge file is not removed. A try/finally block removes the challenge file in any case.
The current behavior is intentional (a6acdc21030da9a5af9c458be87e06b9e4c80e28), though I'm not sure it's a good idea (and I also don't see that I said it shouldn't be deleted on errors, only that it wasn't before the ACME v2 refactoring :) ).
There's one case I can think of where having the files still there is useful: when the download check fails (https://github.com/diafygi/acme-tiny/pull/271/files#diff-7d802cf8b579d90e224a041b9e054757a417bf1fc394fde3ea2db37d0fba3922R146).
Well there may be circumstances, where it make sense to have the challenge file after failure.
On the other side, my usage is that I have ~100 domains where we do renewal automatically. I see that the failed renewals pile up and I have to clean them separately this is a little bit annoying.
What about add a command line switch to disable the cleanup - f.e. "debug" mode where failed challenges are not deleted?