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';
|
include '/srv/ttrss-utils.php';
|
||||||
|
|
||||||
$confpath = env('TTRSS_PATH', '/var/www/ttrss/');
|
$confpath = env('TTRSS_PATH', '/var/www/ttrss');
|
||||||
$conffile = $confpath . 'config.php';
|
$conffile = $confpath . '/config.php';
|
||||||
|
|
||||||
$ename = 'DB';
|
$ename = 'DB';
|
||||||
$eport = 5432;
|
$eport = 5432;
|
||||||
@ -73,7 +73,8 @@ try {
|
|||||||
}
|
}
|
||||||
catch (PDOException $e) {
|
catch (PDOException $e) {
|
||||||
echo 'Database table not found, applying schema... ' . PHP_EOL;
|
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('/--(.*?);/', '', $schema);
|
||||||
$schema = preg_replace('/[\r\n]/', ' ', $schema);
|
$schema = preg_replace('/[\r\n]/', ' ', $schema);
|
||||||
$schema = trim($schema, ' ;');
|
$schema = trim($schema, ' ;');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user