Assume that TTRSS_PATH has no trailing slash in ttrss-configure-db.php, as in setup-ttrss.sh
This commit is contained in:
parent
d2365335e1
commit
eff41ce188
@ -3,8 +3,8 @@
|
||||
|
||||
include '/srv/ttrss-utils.php';
|
||||
|
||||
$confpath = env('TTRSS_PATH', '/var/www/ttrss/');
|
||||
$conffile = $confpath . 'config.php';
|
||||
$confpath = env('TTRSS_PATH', '/var/www/ttrss');
|
||||
$conffile = $confpath . '/config.php';
|
||||
|
||||
$ename = 'DB';
|
||||
$eport = 5432;
|
||||
@ -73,7 +73,8 @@ try {
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
echo 'Database table not found, applying schema... ' . PHP_EOL;
|
||||
$schema = file_get_contents($confpath . 'schema/ttrss_schema_' . $config['DB_TYPE'] . '.sql');
|
||||
|
||||
$schema = file_get_contents($confpath . '/schema/ttrss_schema_' . $config['DB_TYPE'] . '.sql');
|
||||
$schema = preg_replace('/--(.*?);/', '', $schema);
|
||||
$schema = preg_replace('/[\r\n]/', ' ', $schema);
|
||||
$schema = trim($schema, ' ;');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user