Read dbengine from pandora_server.conf before connecting to the DB.
This commit is contained in:
parent
b853d29c33
commit
2322b07c77
|
@ -67,7 +67,7 @@ if (enterprise_load (\%conf) == 0) {
|
|||
}
|
||||
|
||||
# Connect to the DB
|
||||
my $dbh = db_connect ('mysql', $conf{'dbname'}, $conf{'dbhost'}, $conf{'dbport'}, $conf{'dbuser'}, $conf{'dbpass'});
|
||||
my $dbh = db_connect ($conf{'dbengine'}, $conf{'dbname'}, $conf{'dbhost'}, $conf{'dbport'}, $conf{'dbuser'}, $conf{'dbpass'});
|
||||
my $history_dbh = ($conf{'_history_db_enabled'} eq '1') ? db_connect ('mysql', $conf{'_history_db_name'},
|
||||
$conf{'_history_db_host'}, '3306', $conf{'_history_db_user'}, $conf{'_history_db_pass'}) : undef;
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ $conf{'pandora_path'} = $pandora_conf;
|
|||
pandora_load_config (\%conf);
|
||||
|
||||
# Connect to the DB
|
||||
my $dbh = db_connect ('mysql', $conf{'dbname'}, $conf{'dbhost'}, '3306', $conf{'dbuser'}, $conf{'dbpass'});
|
||||
my $dbh = db_connect ($conf{'dbengine'}, $conf{'dbname'}, $conf{'dbhost'}, '3306', $conf{'dbuser'}, $conf{'dbpass'});
|
||||
|
||||
|
||||
# Start the network sweep
|
||||
|
|
|
@ -959,7 +959,7 @@ pandora_load_config(\%CONF);
|
|||
pandora_start_log(\%CONF);
|
||||
|
||||
# Connect to the DB
|
||||
$DBH = db_connect ('mysql', $CONF{'dbname'}, $CONF{'dbhost'}, $CONF{'dbport'}, $CONF{'dbuser'}, $CONF{'dbpass'});
|
||||
$DBH = db_connect ($CONF{'dbengine'}, $CONF{'dbname'}, $CONF{'dbhost'}, $CONF{'dbport'}, $CONF{'dbuser'}, $CONF{'dbpass'});
|
||||
|
||||
# 0%
|
||||
update_recon_task($DBH, $TASK_ID, 1);
|
||||
|
|
|
@ -360,7 +360,7 @@ pandora_load_config(\%CONF);
|
|||
pandora_start_log(\%CONF);
|
||||
|
||||
# Connect to the DB.
|
||||
$DBH = db_connect ('mysql', $CONF{'dbname'}, $CONF{'dbhost'}, $CONF{'dbport'}, $CONF{'dbuser'}, $CONF{'dbpass'});
|
||||
$DBH = db_connect ($CONF{'dbengine'}, $CONF{'dbname'}, $CONF{'dbhost'}, $CONF{'dbport'}, $CONF{'dbuser'}, $CONF{'dbpass'});
|
||||
|
||||
# Get the recon task from the database.
|
||||
my $task = get_db_single_row ($DBH, 'SELECT * FROM trecon_task WHERE id_rt = ?', $TASK_ID);
|
||||
|
|
Loading…
Reference in New Issue