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-01-27 22:18:16 +0300
committernachoparker <nacho@ownyourbits.com>2019-01-28 18:35:26 +0300
commit55121d483dda8fe286823a3230079b3683a0707e (patch)
tree10ce059630597d5e4fdee66ee22d749bfa917d75
parent9a36ceb4227e3c65ac90af8e534e2a2daddc285e (diff)
update: make letsencrypt update more resiliantv1.4.10
-rw-r--r--changelog.md6
-rwxr-xr-xupdate.sh10
2 files changed, 13 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md
index 753fac21..dca0d906 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,7 +1,9 @@
-[v1.4.9](https://github.com/nextcloud/nextcloudpi/commit/c0f4b78) (2019-01-25) letsencrypt: use the latest github version
+[v1.4.10](https://github.com/nextcloud/nextcloudpi/commit/3231406) (2019-01-27) update: make letsencrypt update more resiliant
-[v1.4.8](https://github.com/nextcloud/nextcloudpi/commit/338da33) (2019-01-26) ncp-update-nc: fix unnecessary quotes
+[v1.4.9](https://github.com/nextcloud/nextcloudpi/commit/9a36ceb) (2019-01-25) letsencrypt: use the latest github version
+
+[v1.4.8 ](https://github.com/nextcloud/nextcloudpi/commit/338da33) (2019-01-26) ncp-update-nc: fix unnecessary quotes
[v1.4.7 ](https://github.com/nextcloud/nextcloudpi/commit/ffc1fa5) (2019-01-25) ncp-config: fix local variables
diff --git a/update.sh b/update.sh
index 978f728d..90662f7d 100755
--- a/update.sh
+++ b/update.sh
@@ -284,12 +284,20 @@ EOF
rm -f /etc/letsencrypt
apt-get remove -y letsencrypt
apt-get autoremove -y
- install_app letsencrypt
+ install_app letsencrypt || { rm -rf /etc/letsencrypt; mv /etc/letsencrypt-old /etc/letsencrypt; exit 1; }
cp -raT /etc/letsencrypt-old/live /etc/letsencrypt/live
[[ -f /.docker-image ]] && persistent_cfg /etc/letsencrypt
[[ -f /etc/cron.weekly/letsencrypt-ncp ]] && run_app letsencrypt
}
+ # fix LE update bug
+ [[ -d /etc/letsencrypt/archive ]] || {
+ sleep 3
+ cp -ravT /etc/letsencrypt-old/archive /etc/letsencrypt/archive || true
+ bash -c "sleep 2 && service apache2 reload" &>/dev/null &
+ }
+
+
# 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 )"