From d934a9192db4b9504d0364d99147ed8eef38eed9 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Mon, 7 Jan 2019 07:30:42 +0100 Subject: [PATCH] Maintenance operations: fix user for multi-instance and apply at installation --- scripts/install | 5 +++++ scripts/upgrade.d/upgrade.last.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 7173e1d..246f6ea 100755 --- a/scripts/install +++ b/scripts/install @@ -236,6 +236,11 @@ ynh_replace_string "#DESTDIR#" "$final_path" "$cron_path" exec_occ background:cron +#================================================= +# POST-INSTALL MAINTENANCE +#================================================= +(cd /tmp ; at now + 10 minutes <<< "(cd $final_path ; sudo -u $app php occ db:add-missing-indices ; sudo -u $app php occ db:convert-filecache-bigint -n) > /tmp/nextcloud_maintenance.log") + #================================================= # CONFIGURE THE HOOK FILE FOR USER CREATE #================================================= diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index e061d31..0d0d7a2 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -12,5 +12,5 @@ last_upgrade_operations () { 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") + (cd /tmp ; at now + 10 minutes <<< "(cd $final_path ; sudo -u $app php occ db:add-missing-indices ; sudo -u $app php occ db:convert-filecache-bigint -n) > /tmp/nextcloud_maintenance.log") }