Description: change default config
 patch default config to load database information from
 external file, use /var/cache/tt-rss as cache dir and
 /var/lib/tt-rss as locking directory.
Forwarded: not-needed
Author: Sebastian Reichel <sre@debian.org>
Last-Update: 2019-09-23

Index: tt-rss/config.php-dist
===================================================================
--- tt-rss.orig/config.php-dist
+++ tt-rss/config.php-dist
@@ -3,12 +3,13 @@
 	// *** Database configuration (important!) ***
 	// *******************************************
 
-	define('DB_TYPE', '%DB_TYPE'); // pgsql or mysql
-	define('DB_HOST', '%DB_HOST');
-	define('DB_USER', '%DB_USER');
-	define('DB_NAME', '%DB_NAME');
-	define('DB_PASS', '%DB_PASS');
-	define('DB_PORT', '%DB_PORT'); // usually 5432 for PostgreSQL, 3306 for MySQL
+	include_once('/etc/tt-rss/database.php');
+	define('DB_TYPE', $dbtype);
+	define('DB_HOST', $dbserver);
+	define('DB_PORT', $dbport);
+	define('DB_USER', $dbuser);
+	define('DB_NAME', $dbname);
+	define('DB_PASS', $dbpass);
 
 	define('MYSQL_CHARSET', 'UTF8');
 	// Connection charset for MySQL. If you have a legacy database and/or experience
@@ -51,11 +52,11 @@
 	// then most probably you are using the CGI binary. If you are unsure what to
 	// put in here, ask your hosting provider.
 
-	define('LOCK_DIRECTORY', 'lock');
+	define('LOCK_DIRECTORY', '/var/lib/tt-rss');
 	// Directory for lockfiles, must be writable to the user you run
 	// daemon process or cronjobs under.
 
-	define('CACHE_DIR', 'cache');
+	define('CACHE_DIR', '/var/cache/tt-rss');
 	// Local cache directory for RSS feed content.
 
 	define('ICONS_DIR', "feed-icons");
@@ -155,7 +156,7 @@
 	// Disabling auth_internal in this list would automatically disable
 	// reset password link on the login form.
 
-	define('LOG_DESTINATION', 'sql');
+	define('LOG_DESTINATION', 'syslog');
 	// Error log destination to use. Possible values: sql (uses internal logging
 	// you can read in Preferences -> System), syslog - logs to system log.
 	// Setting this to blank uses PHP logging (usually to http server
