mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-02 17:14:38 +02:00
chore: add tools for manually administrating the configured cache (#3867)
This commit is contained in:
parent
3ce94409ab
commit
0bf5dbbc0b
10 changed files with 95 additions and 45 deletions
25
index.php
25
index.php
|
@ -1,33 +1,14 @@
|
|||
<?php
|
||||
|
||||
if (version_compare(\PHP_VERSION, '7.4.0') === -1) {
|
||||
exit('RSS-Bridge requires minimum PHP version 7.4.0!');
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/lib/bootstrap.php';
|
||||
|
||||
$errors = Configuration::checkInstallation();
|
||||
if ($errors) {
|
||||
print '<pre>' . implode("\n", $errors) . '</pre>';
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$customConfig = [];
|
||||
if (file_exists(__DIR__ . '/config.ini.php')) {
|
||||
$customConfig = parse_ini_file(__DIR__ . '/config.ini.php', true, INI_SCANNER_TYPED);
|
||||
}
|
||||
Configuration::loadConfiguration($customConfig, getenv());
|
||||
|
||||
// Consider: ini_set('error_reporting', E_ALL & ~E_DEPRECATED);
|
||||
date_default_timezone_set(Configuration::getConfig('system', 'timezone'));
|
||||
|
||||
$rssBridge = new RssBridge();
|
||||
|
||||
set_exception_handler(function (\Throwable $e) {
|
||||
http_response_code(500);
|
||||
print render(__DIR__ . '/templates/exception.html.php', ['e' => $e]);
|
||||
RssBridge::getLogger()->error('Uncaught Exception', ['e' => $e]);
|
||||
exit(1);
|
||||
http_response_code(500);
|
||||
exit(render(__DIR__ . '/templates/exception.html.php', ['e' => $e]));
|
||||
});
|
||||
|
||||
set_error_handler(function ($code, $message, $file, $line) {
|
||||
|
@ -63,4 +44,6 @@ register_shutdown_function(function () {
|
|||
}
|
||||
});
|
||||
|
||||
$rssBridge = new RssBridge();
|
||||
|
||||
$rssBridge->main($argv ?? []);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue