[add] common config file
This commit is contained in:
parent
37cb092a24
commit
d59d4dae07
|
@ -0,0 +1 @@
|
|||
bin/bancount.cfg
|
|
@ -4,7 +4,10 @@ action=$1
|
|||
ip=$2
|
||||
service=$3
|
||||
|
||||
source bancount.cfg
|
||||
curDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
||||
echo $curDir
|
||||
|
||||
source $curDir/bancount.cfg
|
||||
|
||||
geoip () {
|
||||
geoiplookup $ip | awk -F, '{print $2}' | sed s/\ //
|
||||
|
|
11
index.php
11
index.php
|
@ -12,6 +12,9 @@ echo "</head>\n";
|
|||
echo "<body>\n";
|
||||
echo "<div id='header'>\n";
|
||||
|
||||
$bddCfg = parse_ini_file('bin/bancount.cfg');
|
||||
|
||||
|
||||
// Fail2BanCount - Displays information from the database
|
||||
// I won't claim this is all my original code, as it has
|
||||
// been borrowed from various places online. Use it as you
|
||||
|
@ -19,10 +22,10 @@ echo "<div id='header'>\n";
|
|||
|
||||
// Database connection info
|
||||
|
||||
$db_host = 'localhost';
|
||||
$db_user = 'fail2bancount';
|
||||
$db_pwd = '';
|
||||
$database = 'fail2bancount';
|
||||
$db_host = '127.0.0.1';
|
||||
$db_user = $bddCfg['mysqluser'];
|
||||
$db_pwd = $bddCfg['mysqlpw'];
|
||||
$database = $bddCfg['mysqldb'];
|
||||
|
||||
// Page variable
|
||||
|
||||
|
|
Loading…
Reference in New Issue