diff options
Diffstat (limited to 'bin/ncp/NETWORKING/letsencrypt.sh')
-rw-r--r-- | bin/ncp/NETWORKING/letsencrypt.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/ncp/NETWORKING/letsencrypt.sh b/bin/ncp/NETWORKING/letsencrypt.sh index 06b49b1d..4db06edc 100644 --- a/bin/ncp/NETWORKING/letsencrypt.sh +++ b/bin/ncp/NETWORKING/letsencrypt.sh @@ -66,11 +66,7 @@ configure() #!/bin/bash # renew and notify -$letsencrypt renew --quiet --deploy-hook ' - ncc notification:generate \ - $NOTIFYUSER "SSL renewal" \ - -l "Your SSL certificate(s) \$RENEWED_DOMAINS has been renewed for another 90 days" - ' +$letsencrypt renew --quiet # notify if fails [[ \$? -ne 0 ]] && ncc notification:generate \ @@ -82,6 +78,14 @@ rm -rf $ncdir/.well-known EOF chmod 755 /etc/cron.weekly/letsencrypt-ncp + cat > /etc/letsencrypt/renewal-hooks/deploy/ncp <<EOF +#!/bin/bash +/usr/local/bin/ncc notification:generate \ + $NOTIFYUSER "SSL renewal" \ + -l "Your SSL certificate(s) \$RENEWED_DOMAINS has been renewed for another 90 days" +EOF + chmod +x /etc/letsencrypt/renewal-hooks/deploy/ncp + # Configure Apache sed -i "s|SSLCertificateFile.*|SSLCertificateFile /etc/letsencrypt/live/$DOMAIN_LOWERCASE/fullchain.pem|" $vhostcfg sed -i "s|SSLCertificateKeyFile.*|SSLCertificateKeyFile /etc/letsencrypt/live/$DOMAIN_LOWERCASE/privkey.pem|" $vhostcfg |