diff options
| author | 2019-11-06 21:54:13 +0100 | |
|---|---|---|
| committer | 2019-11-06 21:54:13 +0100 | |
| commit | 91cb165829badde07c42a002215cf52779d891b6 (patch) | |
| tree | b8ee6e04e32dcf6c6fc25b7b0b9fe2952d2991ba /cli | |
| parent | 3aa66f317b496ccd9a2df914bbc747c52081a7ad (diff) | |
| parent | 6d596e9e54308297d423b23bf65338d62eebc415 (diff) | |
Merge pull request #2633 from FreshRSS/dev1.15.1
FreshRSS 1.15.1
Diffstat (limited to 'cli')
| -rwxr-xr-x | cli/do-install.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cli/do-install.php b/cli/do-install.php index dea5d235e..fa6bac8c8 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -82,7 +82,24 @@ if (file_put_contents(join_path(DATA_PATH, 'config.php'), fail('FreshRSS could not write configuration file!: ' . join_path(DATA_PATH, 'config.php')); } -if (!checkDb()) { +if (function_exists('opcache_reset')) { + opcache_reset(); +} + +Minz_Configuration::register('system', DATA_PATH . '/config.php', FRESHRSS_PATH . '/config.default.php'); +FreshRSS_Context::$system_conf = Minz_Configuration::get('system'); + +Minz_Session::_param('currentUser', $config['default_user']); + +$ok = false; +try { + $ok = initDb(); +} catch (Exception $ex) { + $_SESSION['bd_error'] = $ex->getMessage(); + $ok = false; +} + +if (!$ok) { @unlink(join_path(DATA_PATH, 'config.php')); fail('FreshRSS database error: ' . (empty($_SESSION['bd_error']) ? 'Unknown error' : $_SESSION['bd_error'])); } |
