Till Brehm
2014-07-27 ea39b94c5f11f4e2255bce5bde5e6c8d2f1f0a59
install/dist/lib/fedora.lib.php
@@ -229,8 +229,13 @@
      if(!stristr($options, 'dont-create-certs')) {
         //* Create the SSL certificate
         $command = 'cd '.$config_dir.'; '
            .'openssl req -new -outform PEM -out smtpd.cert -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM -days 365 -x509';
         if(AUTOINSTALL){
            $command = 'cd '.$config_dir.'; '
               ."openssl req -new -subj '/C=".$autoinstall['ssl_cert_country']."/ST=".$autoinstall['ssl_cert_state']."/L=".$autoinstall['ssl_cert_locality']."/O=".$autoinstall['ssl_cert_organisation']."/OU=".$autoinstall['ssl_cert_organisation_unit']."/CN=".$autoinstall['ssl_cert_common_name']."' -outform PEM -out smtpd.cert -newkey rsa:4096 -nodes -keyout smtpd.key -keyform PEM -days 3650 -x509";
         } else {
            $command = 'cd '.$config_dir.'; '
               ."openssl req -new -subj '/C=".escapeshellcmd($autoinstall['ssl_cert_country'])."/ST=".escapeshellcmd($autoinstall['ssl_cert_state'])."/L=".escapeshellcmd($autoinstall['ssl_cert_locality'])."/O=".escapeshellcmd($autoinstall['ssl_cert_organisation'])."/OU=".escapeshellcmd($autoinstall['ssl_cert_organisation_unit'])."/CN=".escapeshellcmd($autoinstall['ssl_cert_common_name'])."' -outform PEM -out smtpd.cert -newkey rsa:4096 -nodes -keyout smtpd.key -keyform PEM -days 3650 -x509";
         }
         exec($command);
         $command = 'chmod o= '.$config_dir.'/smtpd.key';
@@ -392,7 +397,6 @@
         'virtual_transport = dovecot',
         'smtpd_sasl_type = dovecot',
         'smtpd_sasl_path = private/auth',
         'receive_override_options = no_address_mappings'
      );
      // Make a backup copy of the main.cf file
@@ -438,6 +442,8 @@
         copy("$config_dir/$configfile", "$config_dir/$configfile~");
         exec("chmod 400 $config_dir/$configfile~");
      }
      if(!@file_exists('/etc/dovecot-sql.conf')) exec('ln -s /etc/dovecot/dovecot-sql.conf /etc/dovecot-sql.conf');
      $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_dovecot-sql.conf.master', "tpl/fedora_dovecot-sql.conf.master");
      $content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
@@ -450,7 +456,7 @@
      exec("chown root:root $config_dir/$configfile");
      
      // Dovecot shall ignore mounts in website directory
      exec("doveadm mount add '/var/www/*' ignore");
      if(is_installed('doveadm')) exec("doveadm mount add '/var/www/*' ignore > /dev/null 2> /dev/null");
   }
@@ -669,6 +675,8 @@
            }
         }
      }
      if(count($ip_addresses) > 0) $tpl->setLoop('ip_adresses',$ip_addresses);
      wf($vhost_conf_dir.'/ispconfig.conf', $tpl->grab());
      unset($tpl);
@@ -1200,6 +1208,9 @@
      //* Remove Domain module as its functions are available in the client module now
      if(@is_dir('/usr/local/ispconfig/interface/web/domain')) exec('rm -rf /usr/local/ispconfig/interface/web/domain');
      // Add symlink for patch tool
      if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
   }