maintenance

This commit is contained in:
2021-04-06 23:05:02 +02:00
parent ebdece7144
commit 536cae7a90
4 changed files with 77 additions and 5 deletions

View File

@@ -1,14 +1,21 @@
<?php
include_once 'core/core.php';
include_once 'core/datetime.php';
include_once 'core/constants.php';
if (is_file("MAINTENANCE")) {
http_response_code(503);
$currentDir = dirname(__FILE__);
serveStatic($currentDir, "/static/maintenance.html");
die();
}
use Api\Request;
use Configuration\Configuration;
use Documents\Document404;
use Elements\Document;
include_once 'core/core.php';
include_once 'core/datetime.php';
include_once 'core/constants.php';
if (!is_readable(getClassPath(Configuration::class))) {
header("Content-Type: application/json");
die(json_encode(array( "success" => false, "msg" => "Configuration directory is not readable, check permissions before proceeding." )));