Commit 3fc7e1c9 authored by Marius Burkard's avatar Marius Burkard

- added mysql cli check

parent 9f80cba3
......@@ -191,6 +191,17 @@ if($has_ispconfig) {
}
mysqli_close($res);
}
$retcode = 0;
$retout = array();
if($clientdb_password) {
exec('mysql -h ' . escapeshellarg($clientdb_host) . ' -u ' . escapeshellarg($clientdb_user) . ' -D ' . escapeshellarg($conf['db_database']) . ' -p' . escapeshellarg($clientdb_password) . ' -e "SHOW TABLES"', $retout, $retcode);
} else {
exec('mysql -h ' . escapeshellarg($clientdb_host) . ' -u ' . escapeshellarg($clientdb_user) . ' -D ' . escapeshellarg($conf['db_database']) . ' -e "SHOW TABLES"', $retout, $retcode);
}
if($retcode != 0) {
outlog("[WARN] Could not use mysql command line to connect to the database. Check your mysql config!");
}
}
// try to check connection to interface
......@@ -296,7 +307,6 @@ foreach($check_services as $name => $port) {
outlog("\n##### LISTENING PORTS #####\n" . $netstat_out . "\n\n");
outlog("\n##### IPTABLES #####\n" . $iptables_out . "\n\n");
if(OUTPUT == false) {
print "\n##### SCRIPT FINISHED #####\n";
print "Results can be found in htf_report.txt\n";
......@@ -305,4 +315,3 @@ if(OUTPUT == false) {
}
exit;
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment