From 6331ce5dcdaf0f61d24792654ccc2cdb2639ed70 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Mon, 28 Jan 2019 11:48:40 -0700 Subject: [PATCH] update: make letsencrypt update more resiliant (2) --- changelog.md | 6 ++++-- update.sh | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index dca0d9069..af6d64df7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,9 @@ -[v1.4.10](https://github.com/nextcloud/nextcloudpi/commit/3231406) (2019-01-27) update: make letsencrypt update more resiliant +[v1.4.11](https://github.com/nextcloud/nextcloudpi/commit/2cd950d) (2019-01-28) update: make letsencrypt update more resiliant (2) -[v1.4.9](https://github.com/nextcloud/nextcloudpi/commit/9a36ceb) (2019-01-25) letsencrypt: use the latest github version +[v1.4.10](https://github.com/nextcloud/nextcloudpi/commit/55121d4) (2019-01-27) update: make letsencrypt update more resiliant + +[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 diff --git a/update.sh b/update.sh index 90662f7df..5e25a62da 100755 --- a/update.sh +++ b/update.sh @@ -297,6 +297,13 @@ EOF bash -c "sleep 2 && service apache2 reload" &>/dev/null & } + # fix LE update bug (2) + if [[ -d /etc/letsencrypt/archive ]] && [[ "$(ls /etc/letsencrypt/archive/* 2>/dev/null | wc -l )" == "0" ]]; then + rmdir /etc/letsencrypt/archive + sleep 3 + cp -ravT /etc/letsencrypt-old/archive /etc/letsencrypt/archive || true + bash -c "sleep 2 && service apache2 reload" &>/dev/null & + fi # 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)