From c4fc42092c4caa8b0d3cdaf01ec2d872a6484b9a Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Wed, 11 Jan 2017 10:42:32 +0100 Subject: [PATCH] evoacme: generate autosign cert on certbot fail --- evoacme/files/evoacme.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/evoacme/files/evoacme.sh b/evoacme/files/evoacme.sh index eb9f5185..b9eaf449 100755 --- a/evoacme/files/evoacme.sh +++ b/evoacme/files/evoacme.sh @@ -27,6 +27,7 @@ rm -f $CRT_DIR/${vhost}.crt $CRT_DIR/${vhost}-fullchain.pem $CRT_DIR/${vhost}-ch sudo -u acme certbot certonly --quiet --webroot --csr $CSR_DIR/${vhost}.csr --webroot-path $ACME_DIR -n --agree-tos --cert-path=$CRT_DIR/${vhost}.crt --fullchain-path=$CRT_DIR/${vhost}-fullchain.pem --chain-path=$CRT_DIR/${vhost}-chain.pem $emailopt --logs-dir $LOG_DIR 2> >(grep -v certbot.crypto_util) if [ $? != 0 ]; then + openssl x509 -req -sha256 -days 365 -in $CSR_DIR/${vhost}.csr -signkey $SSL_KEY_DIR/${vhost}.key -out $CRT_DIR/${vhost}-fullchain.pem exit 1 fi