From 698218cacd4b4e77e55207d7bf60bf8a2389b981 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 16 Dec 2018 18:02:59 +0100 Subject: [PATCH] Plan required maintenance operations after upgrade --- scripts/_common.sh | 2 +- scripts/upgrade.d/upgrade.last.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 7ce131e..566494d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -3,7 +3,7 @@ # COMMON VARIABLES #================================================= -pkg_dependencies="php5-gd php5-json php5-intl php5-mcrypt php5-curl php5-apcu php5-redis php5-ldap php5-imagick imagemagick acl tar smbclient" +pkg_dependencies="php5-gd php5-json php5-intl php5-mcrypt php5-curl php5-apcu php5-redis php5-ldap php5-imagick imagemagick acl tar smbclient at" if [ "$(lsb_release --codename --short)" != "jessie" ]; then pkg_dependencies="$pkg_dependencies php-zip php-apcu php-mbstring php-xml" diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 55c0f06..0a21846 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -8,3 +8,6 @@ nextcloud_source_sha256="4f5dd15a71694bd2f15fba0d2f942e5a5b1f5aba13511c507a23324 # Patch nextcloud files only for the last version cp -a ../sources/patches_last_version/* ../sources/patches + +# Execute post-upgrade operations later on +(cd /tmp ; at now + 10 minutes <<< "(cd $final_path ; sudo -u nextcloud php occ db:add-missing-indices ; sudo -u nextcloud php occ db:convert-filecache-bigint -n) > /tmp/nextcloud_maintenance.log")