[Pkg-owncloud-commits] [owncloud] 255/258: Run “occ upgrade” on upgrade
David Prévot
taffit at moszumanska.debian.org
Sat Oct 11 17:22:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 115eab9f8025fc214a03e75955e97402424e2a01
Author: David Prévot <taffit at debian.org>
Date: Thu Oct 9 22:11:56 2014 -0400
Run “occ upgrade” on upgrade
The database upgrade will now happen on package upgrade, avoiding the
risk of PHP timeouts if done via the web interface, and avoiding the
need of an extra step via the web interface too.
Closes: #764070
---
debian/README.Debian | 19 -------------------
debian/postinst | 5 +++++
2 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index c8e29eb..90a711f 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -120,22 +120,3 @@ ownCloud uses htaccess to configure some URL rewrites, redirects and error
documents. Since the htaccess file assumes ownCloud is accessed under
/owncloud and not under /, it needs to be changed. To fix this, please
replace all occurrences of /owncloud by / in /etc/owncloud/htaccess.
-
-Upgrade
--------
-
-The database upgrade must be made via the web interface. Make sure the PHP
-scripts (max execution time), and the SQL requests, can complete: this can
-take several minutes, depending on the database size.
-Depending on your configuration, you can, e.g. if you are using PHP via
-fcgi, add something like the following to your Apache VirtualHost
-configuration:
-
- <IfModule mod_fcgid.c>
- IPCCommTimeout 7200
- </IfModule>
-
-You should also empty your browser cache, or deactivate it, to perform the
-upgrade. In case ownCloud get stuck in maintenance mode, you could remove
-the “'maintenance' => true,” line from /etc/owncloud/config.php, and
-reconnect to the web interface to try again.
diff --git a/debian/postinst b/debian/postinst
index b4a6edb..f356c8d 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -48,6 +48,11 @@ case "$1" in
chown www-data:adm $file
chmod 0640 $file
fi
+ # Update the database on upgrade
+ # Don’t let it fail, since it exits with 3 if no upgrade is necessary
+ if [ -e /etc/owncloud/config.php ] ; then
+ occ upgrade || true
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list