Commit ca2165e4 authored by Marius Cramer's avatar Marius Cramer
Browse files

- fixed firewall part in installer

parent 15059193
......@@ -791,7 +791,7 @@ class installer_dist extends installer_base {
if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
public function configure_firewall()
public function configure_bastille_firewall()
{
global $conf;
......
......@@ -865,7 +865,7 @@ class installer_dist extends installer_base {
if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
public function configure_firewall()
public function configure_bastille_firewall()
{
global $conf;
......
......@@ -623,11 +623,17 @@ if($install_mode == 'standard') {
//** Configure Firewall
if(strtolower($inst->simple_query('Configure Firewall Server', array('y', 'n'), 'y','configure_firewall')) == 'y') {
//if($conf['bastille']['installed'] == true) {
//* Configure Bastille Firewall
$conf['services']['firewall'] = true;
swriteln('Configuring Bastille Firewall');
$inst->configure_bastille_firewall();
if($conf['ufw']['installed'] == true) {
//* Configure Ubuntu Firewall
$conf['services']['firewall'] = true;
swriteln('Configuring Ubuntu Firewall');
$inst->configure_ufw_firewall();
} else {
//* Configure Bastille Firewall
$conf['services']['firewall'] = true;
swriteln('Configuring Bastille Firewall');
$inst->configure_bastille_firewall();
}
}
//** Configure Firewall
......
......@@ -393,13 +393,13 @@ function setDefaultServers(){
if(is_array($clients) && !empty($clients)){
foreach($clients as $client){
// mailserver
if(trim($client['mail_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET mail_servers = '".trim($client['default_mailserver'])."' WHERE client_id = ".$client['client_id']);
if(trim($client['mail_servers']) == '') $inst->db->query("UPDATE ?? SET mail_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_mailserver']), $client['client_id']);
// webserver
if(trim($client['web_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET web_servers = '".trim($client['default_webserver'])."' WHERE client_id = ".$client['client_id']);
if(trim($client['web_servers']) == '') $inst->db->query("UPDATE ?? SET web_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_webserver']), $client['client_id']);
// dns server
if(trim($client['dns_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET dns_servers = '".trim($client['default_dnsserver'])."' WHERE client_id = ".$client['client_id']);
if(trim($client['dns_servers']) == '') $inst->db->query("UPDATE ?? SET dns_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_dnsserver']), $client['client_id']);
// db server
if(trim($client['db_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET db_servers = '".trim($client['default_dbserver'])."' WHERE client_id = ".$client['client_id']);
if(trim($client['db_servers']) == '') $inst->db->query("UPDATE ?? SET db_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_dbserver']), $client['client_id']);
}
}
......
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