Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2019-03-23 19:20:23 +0300
committernachoparker <nacho@ownyourbits.com>2019-03-23 19:27:54 +0300
commit38799fd537ffc7c466f76956bd3ff8ba8cc445ac (patch)
tree9a6848022ec60086f15e40edac4b71c48a776f0c
parent24602646d93ab61dd13ee331e70300fd2f9a6beb (diff)
letsencrypt: rework notificationv1.10.6
-rw-r--r--bin/ncp/NETWORKING/letsencrypt.sh14
-rw-r--r--changelog.md8
-rwxr-xr-xupdate.sh9
3 files changed, 24 insertions, 7 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
diff --git a/changelog.md b/changelog.md
index 21f221e9..1cf783e7 100644
--- a/changelog.md
+++ b/changelog.md
@@ -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
diff --git a/update.sh b/update.sh
index c9e4397b..5ce047d0 100755
--- a/update.sh
+++ b/update.sh
@@ -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 )"