mirror of
https://github.com/Yubico/yubikey-ksm.git
synced 2025-02-26 21:54:17 +01:00
Merge pull request #20 from cam34/master
Modify config-db.php include to check for file instead of doing a (failed) include and spamming the log files that the fi
This commit is contained in:
commit
18642b319a
@ -1,7 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
//ykksm will use the configuration stored in /etc/yubico/ksm/config-db.php, if that file exists. If it does not exist, the below values will be used.
|
//ykksm will use the configuration stored in /etc/yubico/ksm/config-db.php, if that file exists. If it does not exist, the below values will be used.
|
||||||
|
|
||||||
if(!include '/etc/yubico/ksm/config-db.php') {
|
if(file_exists('/etc/yubico/ksm/config-db.php')) {
|
||||||
|
include '/etc/yubico/ksm/config-db.php';
|
||||||
|
} else {
|
||||||
$dbuser='ykksmreader';
|
$dbuser='ykksmreader';
|
||||||
$dbpass='yourpassword';
|
$dbpass='yourpassword';
|
||||||
$basepath='';
|
$basepath='';
|
||||||
@ -10,7 +12,6 @@ if(!include '/etc/yubico/ksm/config-db.php') {
|
|||||||
$dbport='';
|
$dbport='';
|
||||||
$dbtype='mysql';
|
$dbtype='mysql';
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_dsn = "$dbtype:dbname=$dbname;host=127.0.0.1";
|
$db_dsn = "$dbtype:dbname=$dbname;host=127.0.0.1";
|
||||||
$db_username = $dbuser;
|
$db_username = $dbuser;
|
||||||
$db_password = $dbpass;
|
$db_password = $dbpass;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user