mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
letsencrypt: rework notification
This commit is contained in:
parent
24602646d9
commit
38799fd537
@ -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
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
|
||||
[v1.10.4](https://github.com/nextcloud/nextcloudpi/commit/5675383) (2019-03-18) nc-update-nc-apps-auto: only notify if there was update
|
||||
[v1.10.6](https://github.com/nextcloud/nextcloudpi/commit/076aeb2) (2019-03-23) letsencrypt: rework notification
|
||||
|
||||
[v1.10.3](https://github.com/nextcloud/nextcloudpi/commit/4b6572a) (2019-03-18) nc-update-nc: fix case where imported cfg from non docker to docker
|
||||
[v1.10.5, master](https://github.com/nextcloud/nextcloudpi/commit/2460264) (2019-03-23) fix cron path
|
||||
|
||||
[v1.10.4](https://github.com/nextcloud/nextcloudpi/commit/f0b467b) (2019-03-18) nc-update-nc-apps-auto: only notify if there was update
|
||||
|
||||
[v1.10.3 ](https://github.com/nextcloud/nextcloudpi/commit/4b6572a) (2019-03-18) nc-update-nc: fix case where imported cfg from non docker to docker
|
||||
|
||||
[v1.10.2 ](https://github.com/nextcloud/nextcloudpi/commit/ec66e40) (2019-03-16) freeDNS: fix hash
|
||||
|
||||
|
||||
@ -218,6 +218,15 @@ EOF
|
||||
is_active_app nc-previews-auto && run_app nc-previews-auto
|
||||
is_active_app nc-update-nc-apps-auto && run_app nc-update-nc-apps-auto
|
||||
|
||||
# rework letsencrypt notification
|
||||
USER="$(jq -r '.params[2].value' "$CONFDIR"/letsencrypt.cfg)"
|
||||
cat > /etc/letsencrypt/renewal-hooks/deploy/ncp <<EOF
|
||||
#!/bin/bash
|
||||
/usr/local/bin/ncc notification:generate $USER "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
|
||||
|
||||
|
||||
# remove redundant opcache configuration. Leave until update bug is fixed -> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815968
|
||||
# Bug #416 reappeared after we moved to php7.2 and debian buster packages. (keep last)
|
||||
[[ "$( ls -l /etc/php/7.2/fpm/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/fpm/conf.d/*-opcache.ini | tail -1 )"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user