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:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh10
1 files changed, 9 insertions, 1 deletions
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 )"