Commit 1f502097 authored by Marius Cramer's avatar Marius Cramer

Merge branch 'master' into 'master'

Master

See merge request !211
parents 4e5e9b5a 66fa9bdd
......@@ -290,7 +290,7 @@ class installer extends installer_base
//* Configure master.cf and add a line for deliver
$content = rf($conf["postfix"]["config_dir"].'/master.cf');
$deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DROhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}';
af($conf[$config_dir.'/master.cf', $deliver_content);
af($configdir.'/master.cf', $deliver_content);
unset($content);
unset($deliver_content);
}
......
......@@ -248,11 +248,11 @@ if($install_mode == 'standard') {
$inst->add_database_server_record();
//* Configure Postgrey
$force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey');
$force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey', false);
if($force) swriteln('Configuring Postgrey');
//* Configure Postfix
$force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix');
$force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix', false);
if($force) {
swriteln('Configuring Postfix');
$inst->configure_postfix();
......@@ -262,7 +262,7 @@ if($install_mode == 'standard') {
if($conf['services']['mail']) {
//* Configure Mailman
$force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman');
$force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman', false);
if($force) {
swriteln('Configuring Mailman');
$inst->configure_mailman();
......@@ -270,8 +270,8 @@ if($install_mode == 'standard') {
//* Check for Dovecot and Courier
if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) {
$conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot');
$conf['courier']['installed'] = $inst->force_configure_app('Courier');
$conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot', false);
$conf['courier']['installed'] = $inst->force_configure_app('Courier', false);
}
//* Configure Mailserver - Dovecot or Courier
if($conf['dovecot']['installed'] && $conf['courier']['installed']) {
......@@ -298,21 +298,21 @@ if($install_mode == 'standard') {
}
//* Configure Spamasassin
$force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin');
$force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin', false);
if($force) {
swriteln('Configuring Spamassassin');
$inst->configure_spamassassin();
}
//* Configure Amavis
$force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd');
$force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd', false);
if($force) {
swriteln('Configuring Amavisd');
$inst->configure_amavis();
}
//* Configure Getmail
$force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail');
$force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail', false);
if($force) {
swriteln('Configuring Getmail');
$inst->configure_getmail();
......@@ -322,9 +322,9 @@ if($install_mode == 'standard') {
//* Check for DNS
if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) {
$conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS');
$conf['bind']['installed'] = $inst->force_configure_app('BIND');
$conf['mydns']['installed'] = $inst->force_configure_app('MyDNS');
$conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS', false);
$conf['bind']['installed'] = $inst->force_configure_app('BIND', false);
$conf['mydns']['installed'] = $inst->force_configure_app('MyDNS', false);
}
//* Configure PowerDNS
if($conf['powerdns']['installed']) {
......@@ -346,14 +346,14 @@ if($install_mode == 'standard') {
}
//* Configure Jailkit
$force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit');
$force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit', false);
if($force) {
swriteln('Configuring Jailkit');
$inst->configure_jailkit();
}
//* Configure Pureftpd
$force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd');
$force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd', false);
if($force) {
swriteln('Configuring Pureftpd');
$inst->configure_pureftpd();
......@@ -361,8 +361,8 @@ if($install_mode == 'standard') {
//* Check for Web-Server
if(!$conf['apache']['installed'] && !$conf['nginx']['installed']) {
$conf['apache']['installed'] = $inst->force_configure_app('Apache');
$conf['nginx']['installed'] = $inst->force_configure_app('nginx');
$conf['apache']['installed'] = $inst->force_configure_app('Apache', false);
$conf['nginx']['installed'] = $inst->force_configure_app('nginx', false);
}
//* Configure Webserver - Apache or nginx
......@@ -382,7 +382,7 @@ if($install_mode == 'standard') {
$conf['services']['web'] = true;
$conf['services']['file'] = true;
//* Configure Vlogger
$force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger');
$force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger', false);
if($force) {
swriteln('Configuring vlogger');
$inst->configure_vlogger();
......@@ -406,7 +406,7 @@ if($install_mode == 'standard') {
}
//* Configure XMPP
$force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server');
$force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server', false);
if($force) {
swriteln('Configuring Metronome XMPP Server');
$inst->configure_xmpp();
......@@ -415,8 +415,8 @@ if($install_mode == 'standard') {
//* Check for Firewall
if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) {
$conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall');
$conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall');
$conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall', false);
$conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall', false);
}
//* Configure Firewall - Ubuntu or Bastille
if($conf['ufw']['installed'] && $conf['firewall']['installed']) {
......@@ -441,14 +441,14 @@ if($install_mode == 'standard') {
}
//* Configure Fail2ban
$force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban');
$force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban', false);
if($force) {
swriteln('Configuring Fail2ban');
$inst->configure_fail2ban();
}
//* Configure OpenVZ
$force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ');
$force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ', false);
if($force) {
$conf['services']['vserver'] = true;
swriteln('Configuring OpenVZ');
......@@ -873,4 +873,4 @@ chmod($md5_filename,0700);
echo "Installation completed.\n";
?>
\ No newline at end of file
?>
......@@ -164,13 +164,14 @@ class installer_base {
if ($conf['services']['web'] && (($conf['apache']['installed'] && is_file($conf['apache']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")) || ($conf['nginx']['installed'] && is_file($conf['nginx']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")))) $this->ispconfig_interface_installed = true;
}
public function force_configure_app($service) {
public function force_configure_app($service, $enable_force=true) {
$force = false;
swriteln("[WARN] autodetect for $service failed");
if(strtolower($this->simple_query("Force configure $service", array('y', 'n'), 'n') ) == 'y') {
// swriteln("Configure $service");
$force = true;
} else swriteln("Skipping $service\n");
if($enable_force) {
if(strtolower($this->simple_query("Force configure $service", array('y', 'n'), 'n') ) == 'y') {
$force = true;
} else swriteln("Skipping $service\n");
}
return $force;
}
......
......@@ -785,6 +785,7 @@ CREATE TABLE `mail_forwarding` (
`destination` text,
`type` enum('alias','aliasdomain','forward','catchall') NOT NULL default 'alias',
`active` enum('n','y') NOT NULL DEFAULT 'n',
`greylisting` enum('n','y' ) NOT NULL DEFAULT 'n',
PRIMARY KEY (`forwarding_id`),
KEY `server_id` (`server_id`,`source`),
KEY `type` (`type`)
......@@ -928,6 +929,7 @@ CREATE TABLE `mail_user` (
`move_junk` enum('n','y') NOT NULL default 'n',
`custom_mailfilter` mediumtext,
`postfix` enum('n','y') NOT NULL default 'y',
`greylisting` enum('n','y' ) NOT NULL DEFAULT 'n',
`access` enum('n','y') NOT NULL default 'y',
`disableimap` enum('n','y') NOT NULL default 'n',
`disablepop3` enum('n','y') NOT NULL default 'n',
......
......@@ -48,7 +48,7 @@ $nanny_details_level = 2; # nanny verbosity: 1: traditional, 2: detailed
@local_domains_maps = ( [".$mydomain"] ); # list of all local domains
@mynetworks = qw( 00.0.0.0/8 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
@mynetworks = qw( 0.0.0.0/8 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
$unix_socketname = "$MYHOME/amavisd.sock"; # amavisd-release or amavis-milter
......
......@@ -18,7 +18,7 @@ admin_notify_events=1
backup_dir=/var/backup
backup_dir_is_mount=y
backup_mode=rootgz
backup_delete=y
backup_delete=n
monit_url=
monit_user=
monit_password=
......
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,6 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Šablona';
$wb['Advanced'] = 'Pokročilý';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,6 +38,6 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Pokročilý';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages ist leer.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Erweitert';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -37,5 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O Priorität ist leer.';
$wb['template_nameserver_error_empty'] = 'Nameserver ist leer.';
$wb['Virtual server'] = 'Virtueller Server';
$wb['Advanced'] = 'Erweitert';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Το Nameserver(s) είναι κενό
$wb['Virtual server'] = 'Εικονικός server';
$wb['Advanced'] = 'Για προχωρημένους';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,6 +91,5 @@ $wb["swappages_error_empty"] = 'Swappages is empty.';
$wb["Template"] = 'Template';
$wb["Advanced"] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb['features_txt'] = 'iptables';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb["template_nameserver_error_empty"] = 'Nameserver(s) is empty.';
$wb["Virtual server"] = 'Virtual server';
$wb["Advanced"] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages esta vacío.';
$wb['Template'] = 'Plantilla';
$wb['Advanced'] = 'Avanzado';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) está vacío.';
$wb['Virtual server'] = 'Servidor virtual';
$wb['Advanced'] = 'Avanzado';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages est vide.';
$wb['Template'] = 'Modèle';
$wb['Advanced'] = 'Avancé';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) est vide.';
$wb['Virtual server'] = 'Serveur virtuel';
$wb['Advanced'] = 'Avancé';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,7 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages polje je prazno.';
$wb['Template'] = 'Predložak';
$wb['Advanced'] = 'Napredno';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,7 +38,7 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(i) polje je prazno.';
$wb['Virtual server'] = 'Virtualni server';
$wb['Advanced'] = 'Napredno';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -91,5 +91,5 @@ $wb['swappages_error_empty'] = 'Swappages is empty.';
$wb['Template'] = 'Template';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -38,5 +38,5 @@ $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
$wb['Virtual server'] = 'Virtual server';
$wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "iptables";
$wb["iptables_txt"] = "IP Tables";
?>
......@@ -15,8 +15,8 @@
<label for="numothersock" class="col-sm-3 control-label">{tmpl_var name='numothersock_txt'}</label>
<div class="col-sm-9"><input type="text" name="numothersock" id="numothersock" value="{tmpl_var name='numothersock'}" class="form-control" /></div></div>
<div class="form-group">
<label for="vmguarpages" class="col-sm-3 control-label">{tmpl_var name='vmguarpages_txt'}</label>
<div class="col-sm-9"><input type="text" name="vmguarpages" id="vmguarpages" value="{tmpl_var name='vmguarpages'}" class="form-control" /></div></div>
<label for="vmguarpages" class="col-sm-3 control-label" readonly >{tmpl_var name='vmguarpages_txt'}</label>
<div class="col-sm-9"><input type="text" name="vmguarpages" id="vmguarpages" value="{tmpl_var name='vmguarpages'}" class="form-control" readonly /></div></div>
<div class="form-group">
<label for="kmemsize" class="col-sm-3 control-label">{tmpl_var name='kmemsize_txt'}</label>
<div class="col-sm-9"><input type="text" name="kmemsize" id="kmemsize" value="{tmpl_var name='kmemsize'}" class="form-control" /></div></div>
......@@ -34,16 +34,16 @@
<div class="col-sm-9"><input type="text" name="dgramrcvbuf" id="dgramrcvbuf" value="{tmpl_var name='dgramrcvbuf'}" class="form-control" /></div></div>
<div class="form-group">
<label for="oomguarpages" class="col-sm-3 control-label">{tmpl_var name='oomguarpages_txt'}</label>
<div class="col-sm-9"><input type="text" name="oomguarpages" id="oomguarpages" value="{tmpl_var name='oomguarpages'}" class="form-control" /></div></div>
<div class="col-sm-9"><input type="text" name="oomguarpages" id="oomguarpages" value="{tmpl_var name='oomguarpages'}" class="form-control" readonly /></div></div>
<div class="form-group">
<label for="privvmpages" class="col-sm-3 control-label">{tmpl_var name='privvmpages_txt'}</label>
<div class="col-sm-9"><input type="text" name="privvmpages" id="privvmpages" value="{tmpl_var name='privvmpages'}" class="form-control" /></div></div>
<div class="col-sm-9"><input type="text" name="privvmpages" id="privvmpages" value="{tmpl_var name='privvmpages'}" class="form-control" readonly /></div></div>
<div class="form-group">
<label for="lockedpages" class="col-sm-3 control-label">{tmpl_var name='lockedpages_txt'}</label>
<div class="col-sm-9"><input type="text" name="lockedpages" id="lockedpages" value="{tmpl_var name='lockedpages'}" class="form-control" /></div></div>
<div class="form-group">
<label for="shmpages" class="col-sm-3 control-label">{tmpl_var name='shmpages_txt'}</label>
<div class="col-sm-9"><input type="text" name="shmpages" id="shmpages" value="{tmpl_var name='shmpages'}" class="form-control" /></div></div>
<div class="col-sm-9"><input type="text" name="shmpages" id="shmpages" value="{tmpl_var name='shmpages'}" class="form-control" readonly /></div></div>
<div class="form-group">
<label for="physpages" class="col-sm-3 control-label">{tmpl_var name='physpages_txt'}</label>
<div class="col-sm-9"><input type="text" name="physpages" id="physpages" value="{tmpl_var name='physpages'}" class="form-control" /></div></div>
......
......@@ -192,11 +192,16 @@ class cronjob_backup extends cronjob {
$web_user = $rec['system_user'];
$web_backup_dir = realpath($backup_dir.'/web'.$web_id);
if(is_dir($web_backup_dir)) {
exec('sudo -u '.escapeshellarg($web_user).' rm -f '.escapeshellarg($web_backup_dir.'/*'));
$sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ?";
$app->db->query($sql, $conf['server_id'], $web_id);
if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id);
$dir_handle = opendir($web_backup_dir.'/');
while ($file = readdir($dir_handle)) {
if(!is_dir($file)) {
unlink ("$web_backup_dir/"."$file");
}
}
}
$sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ?";
$app->db->query($sql, $conf['server_id'], $web_id);
if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id);
}
}
}
......@@ -353,15 +358,7 @@ class cronjob_backup extends cronjob {
}
//* end run_backups
if( $server_config['backup_dir_is_mount'] == 'y' ) $app->system->umount_backup_dir($backup_dir);
} else {
//* send email to admin that backup directory could not be mounted
$global_config = $app->getconf->get_global_config('mail');
if($global_config['admin_mail'] != ''){
$subject = 'Backup directory '.$backup_dir.' could not be mounted';
$message = "Backup directory ".$backup_dir." could not be mounted.\n\nThe command\n\n".$server_config['backup_dir_mount_cmd']."\n\nfailed.";
mail($global_config['admin_mail'], $subject, $message);
}
}
}
}
// delete files from backup download dir (/var/www/example.com/backup)
......
......@@ -66,7 +66,6 @@ class cronjob_backup_mail extends cronjob {
if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $run_backups = false;
$records = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE server_id = ? AND maildir != ''", intval($conf['server_id']));
if(is_array($records) && $run_backups) {
if(!is_dir($backup_dir)) {
mkdir(escapeshellcmd($backup_dir), $backup_dir_permissions, true);
......@@ -76,12 +75,13 @@ class cronjob_backup_mail extends cronjob {
foreach($records as $rec) {
//* Do the mailbox backup
$email = $rec['email'];
$temp = explode("@",$email);
$domain = $temp[1];
unset($temp);
$domain_rec=$app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain = ?", $domain);
if($rec['backup_interval'] == 'daily' or ($rec['backup_interval'] == 'weekly' && date('w') == 0) or ($rec['backup_interval'] == 'monthly' && date('d') == '01')) {
$email = $rec['email'];
$temp = explode("@",$email);
$domain = $temp[1];
unset($temp);;
$domain_rec=$app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain = ?", $domain);
$backupusername = 'root';
$backupgroup = 'root';
......@@ -194,23 +194,29 @@ class cronjob_backup_mail extends cronjob {
unset($dir_handle);
}
/* Remove inactive backups */
if($rec['backup_interval'] == 'none') {
/* remove backups from db */
$sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND mailuser_id = ?";
$app->db->query($sql,