| | |
| | | if(is_installed('named') || is_installed('bind') || is_installed('bind9')) $conf['bind']['installed'] = true; |
| | | if(is_installed('squid')) $conf['squid']['installed'] = true; |
| | | if(is_installed('nginx')) $conf['nginx']['installed'] = true; |
| | | if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true; |
| | | if(is_installed('iptables') && is_installed('bastille-netfilter')) $conf['firewall']['installed'] = true; |
| | | if(is_installed('iptables') && is_installed('ufw')) { |
| | | $conf['ufw']['installed'] = true; |
| | | } elseif(is_installed('iptables')) { |
| | | $conf['firewall']['installed'] = true; |
| | | } |
| | | if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true; |
| | | if(is_installed('vzctl')) $conf['openvz']['installed'] = true; |
| | | if(is_installed('metronome') && is_installed('metronomectl')) $conf['xmpp']['installed'] = true; |
| | | if(is_installed('spamassassin')) $conf['spamassassin']['installed'] = true; |
| | | if(is_installed('vlogger')) $conf['vlogger']['installed'] = true; |
| | | if(is_installed('cron')) $conf['cron']['installed'] = true; |
| | | // if(is_installed('vlogger')) $conf['vlogger']['installed'] = true; |
| | | // ISPConfig ships with vlogger, so it is always installed. |
| | | $conf['vlogger']['installed'] = true; |
| | | if(is_installed('cron') || is_installed('anacron')) $conf['cron']['installed'] = true; |
| | | |
| | | 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; |
| | | } |
| | |
| | | |
| | | // Add the clamav user to the amavis group |
| | | exec('adduser clamav amavis'); |
| | | |
| | | // Create the director for DKIM-Keys |
| | | if(!is_dir('/var/lib/amavis/dkim')) mkdir('/var/lib/amavis/dkim', 0750, true); |
| | | // get shell-user for amavis |
| | | $amavis_user=exec('grep -o "^amavis:\|^vscan:" /etc/passwd'); |
| | | if(!empty($amavis_user)) { |
| | | $amavis_user=rtrim($amavis_user, ":"); |
| | | exec('chown '.$amavis_user.' /var/lib/amavis/dkim'); |
| | | } |
| | | // get shell-group for amavis |
| | | $amavis_group=exec('grep -o "^amavis:\|^vscan:" /etc/group'); |
| | | if(!empty($amavis_group)) { |
| | | $amavis_group=rtrim($amavis_group, ":"); |
| | | exec('chgrp '.$amavis_group.' /var/lib/amavis/dkim'); |
| | | } |
| | | // get shell-user for amavis |
| | | $amavis_user=exec('grep -o "^amavis:\|^vscan:" /etc/passwd'); |
| | | if(!empty($amavis_user)) { |
| | | $amavis_user=rtrim($amavis_user, ":"); |
| | | } |
| | | |
| | | // Create the director for DKIM-Keys |
| | | if(!is_dir('/var/lib/amavis')) mkdir('/var/lib/amavis', 0750, true); |
| | | if(!empty($amavis_user)) exec('chown '.$amavis_user.' /var/lib/amavis'); |
| | | if(!empty($amavis_group)) exec('chgrp '.$amavis_group.' /var/lib/amavis'); |
| | | if(!is_dir('/var/lib/amavis/dkim')) mkdir('/var/lib/amavis/dkim', 0750); |
| | | if(!empty($amavis_user)) exec('chown -R '.$amavis_user.' /var/lib/amavis/dkim'); |
| | | if(!empty($amavis_group)) exec('chgrp -R '.$amavis_group.' /var/lib/amavis/dkim'); |
| | | |
| | | } |
| | | |
| | | public function configure_spamassassin() { |
| | |
| | | if(!@is_dir($conf['ispconfig_log_dir'].'/httpd')) mkdir($conf['ispconfig_log_dir'].'/httpd', 0755, true); |
| | | |
| | | if(is_file('/etc/suphp/suphp.conf')) { |
| | | replaceLine('/etc/suphp/suphp.conf', 'php=php:/usr/bin', 'x-httpd-suphp="php:/usr/bin/php-cgi"', 0); |
| | | replaceLine('/etc/suphp/suphp.conf', 'php="php:/usr/bin', 'x-httpd-suphp="php:/usr/bin/php-cgi"', 0); |
| | | //replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0); |
| | | replaceLine('/etc/suphp/suphp.conf', 'umask=0077', 'umask=0022', 0); |
| | | } |