diff options
Diffstat (limited to 'public.php')
-rw-r--r-- | public.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/public.php b/public.php index eed63948112..1f858fd073d 100644 --- a/public.php +++ b/public.php @@ -3,6 +3,14 @@ try { require_once 'lib/base.php'; + if (\OCP\Util::needUpgrade()) { + // since the behavior of apps or remotes are unpredictable during + // an upgrade, return a 503 directly + OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); + OC_Template::printErrorPage('Service unavailable'); + exit; + } + OC::checkMaintenanceMode(); OC::checkSingleUserMode(); $pathInfo = OC_Request::getPathInfo(); |