Automatically remove certificate if renewal fails

Hi @Deckard

not an answer of your question, but:

tls-sni-01 is deprecated. Support ends 2019-02-13.

So you should change your authentication method.

http-01, dns-01 or tls-alpn-01. acme.sh has (new) an own tls-alpn01-client.