You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
From: Norman Messtorff <normes@normes.org>
|
|
Date: Sun, 23 Mar 2014 17:40:30 +0100
|
|
Subject: db_credentials
|
|
|
|
---
|
|
config.inc.php | 19 ++++++++++++-------
|
|
1 file changed, 12 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/config.inc.php b/config.inc.php
|
|
index e41e7c3..538446d 100644
|
|
--- a/config.inc.php
|
|
+++ b/config.inc.php
|
|
@@ -16,6 +16,11 @@
|
|
* Contains configuration options.
|
|
*/
|
|
|
|
+// This loads the automatic generated DB credentials from /etc/postfixadmin/dbconfig.inc.php
|
|
+require_once('dbconfig.inc.php');
|
|
+if (!isset($dbserver) || empty($dbserver))
|
|
+ $dbserver='localhost';
|
|
+
|
|
/*****************************************************************
|
|
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
* You have to set $CONF['configured'] = true; before the
|
|
@@ -23,7 +28,7 @@
|
|
* Doing this implies you have changed this file as required.
|
|
* i.e. configuring database etc; specifying setup.php password etc.
|
|
*/
|
|
-$CONF['configured'] = false;
|
|
+$CONF['configured'] = true;
|
|
|
|
// In order to setup Postfixadmin, you MUST specify a hashed password here.
|
|
// To create the hash, visit setup.php in a browser and type a password into the field,
|
|
@@ -33,7 +38,7 @@ $CONF['setup_password'] = 'changeme';
|
|
// Postfix Admin Path
|
|
// Set the location of your Postfix Admin installation here.
|
|
// YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin
|
|
-$CONF['postfix_admin_url'] = '';
|
|
+$CONF['postfix_admin_url'] = '/postfixadmin';
|
|
|
|
// shouldn't need changing.
|
|
$CONF['postfix_admin_path'] = dirname(__FILE__);
|
|
@@ -46,11 +51,11 @@ $CONF['default_language'] = 'en';
|
|
// mysql = MySQL 3.23 and 4.0, 4.1 or 5
|
|
// mysqli = MySQL 4.1+
|
|
// pgsql = PostgreSQL
|
|
-$CONF['database_type'] = 'mysql';
|
|
-$CONF['database_host'] = 'localhost';
|
|
-$CONF['database_user'] = 'postfix';
|
|
-$CONF['database_password'] = 'postfixadmin';
|
|
-$CONF['database_name'] = 'postfix';
|
|
+$CONF['database_type'] = $dbtype;
|
|
+$CONF['database_host'] = $dbserver;
|
|
+$CONF['database_user'] = $dbuser;
|
|
+$CONF['database_password'] = $dbpass;
|
|
+$CONF['database_name'] = $dbname;
|
|
// If you need to specify a different port for a MYSQL database connection, use e.g.
|
|
// $CONF['database_host'] = '172.30.33.66:3308';
|
|
// If you need to specify a different port for POSTGRESQL database connection
|