diff options
author | nachoparker <nacho@ownyourbits.com> | 2019-03-23 19:20:23 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-03-23 19:27:54 +0300 |
commit | 38799fd537ffc7c466f76956bd3ff8ba8cc445ac (patch) | |
tree | 9a6848022ec60086f15e40edac4b71c48a776f0c /bin/ncp | |
parent | 24602646d93ab61dd13ee331e70300fd2f9a6beb (diff) |
letsencrypt: rework notificationv1.10.6
Diffstat (limited to 'bin/ncp')
-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 |