From 821532cd06500d1085e181c462a06e71a549e10c Mon Sep 17 00:00:00 2001 From: Jonathan Golder Date: Fri, 26 May 2017 18:37:21 +0200 Subject: [PATCH] Don't add cert if letsencrypt complains It makes no sense to call uberspace-add-certificate if letsencrypt fails --- letsencrypt-renew.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt-renew.sh b/letsencrypt-renew.sh index 7873b36..2b4262d 100755 --- a/letsencrypt-renew.sh +++ b/letsencrypt-renew.sh @@ -52,7 +52,7 @@ for inifile in "${LECONFIGDIR}"/cli-*.ini; do openssl x509 -checkend $(( 21 * 86400 )) -in "${LECONFIGDIR}/live/${domain}/cert.pem" > /dev/null && continue # run let's encrypt - letsencrypt certonly -c "${inifile}" + letsencrypt certonly -c "${inifile}" || continue # import certificate uberspace-add-certificate -k "${LECONFIGDIR}/live/${domain}/privkey.pem" -c "${LECONFIGDIR}/live/${domain}/cert.pem"