tbrehm
2010-07-13 ccbd6916c54c5407324d3f7a6daa5f641f78eebd
install/lib/installer_base.lib.php
@@ -196,7 +196,8 @@
      $tpl_ini_array = ini_to_array(rf('tpl/server.ini.master'));
      // TODO: Update further distribution specific parameters for server config here
      //* Update further distribution specific parameters for server config here
      //* HINT: Every line added here has to be added in update.lib.php too!!
      $tpl_ini_array['web']['vhost_conf_dir'] = $conf['apache']['vhost_conf_dir'];
      $tpl_ini_array['web']['vhost_conf_enabled_dir'] = $conf['apache']['vhost_conf_enabled_dir'];
      $tpl_ini_array['jailkit']['jailkit_chroot_app_programs'] = $conf['jailkit']['jailkit_chroot_app_programs'];
@@ -211,6 +212,8 @@
      $tpl_ini_array['web']['security_level'] = 20;
      $tpl_ini_array['web']['user'] = $conf['apache']['user'];
      $tpl_ini_array['web']['group'] = $conf['apache']['group'];
      $tpl_ini_array['web']['php_ini_path_apache'] = $conf['apache']['php_ini_path_apache'];
      $tpl_ini_array['web']['php_ini_path_cgi'] = $conf['apache']['php_ini_path_cgi'];
      $tpl_ini_array['mail']['pop3_imap_daemon'] = ($conf['dovecot']['installed'] == true)?'dovecot':'courier';
      $tpl_ini_array['mail']['mail_filter_syntax'] = ($conf['dovecot']['installed'] == true)?'sieve':'maildrop';
      $tpl_ini_array['dns']['bind_user'] = $conf['bind']['bind_user'];
@@ -643,6 +646,8 @@
      $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
      $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
      wf("$pam/smtp", $content);
      // On some OSes smtp is world readable which allows for reading database information.  Removing world readable rights should have no effect.
      if(is_file("$pam/smtp"))    exec("chmod o= $pam/smtp");
      exec("chmod 660 $pam/smtp");
      exec("chown daemon:daemon $pam/smtp");
@@ -944,7 +949,7 @@
      exec('mkdir -p /var/log/ispconfig/httpd');
      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);
      }
@@ -1242,9 +1247,15 @@
                  $module_name = substr($file,0,-8);
                  $tmp = new $module_name;
                  if($tmp->onInstall()) {
                     if(!@is_link($install_dir.'/server/mods-enabled/'.$file)) @symlink($install_dir.'/server/mods-available/'.$file, $install_dir.'/server/mods-enabled/'.$file);
                     if(!@is_link($install_dir.'/server/mods-enabled/'.$file)) {
                        @symlink($install_dir.'/server/mods-available/'.$file, $install_dir.'/server/mods-enabled/'.$file);
                        // @symlink($install_dir.'/server/mods-available/'.$file, '../mods-enabled/'.$file);
                     }
                     if (strpos($file, '_core_module') !== false) {
                        if(!@is_link($install_dir.'/server/mods-core/'.$file)) @symlink($install_dir.'/server/mods-available/'.$file, $install_dir.'/server/mods-core/'.$file);
                        if(!@is_link($install_dir.'/server/mods-core/'.$file)) {
                           @symlink($install_dir.'/server/mods-available/'.$file, $install_dir.'/server/mods-core/'.$file);
                           // @symlink($install_dir.'/server/mods-available/'.$file, '../mods-core/'.$file);
                        }
                     }
                  }
                  unset($tmp);
@@ -1263,9 +1274,15 @@
                  $plugin_name = substr($file,0,-8);
                  $tmp = new $plugin_name;
                  if(method_exists($tmp,'onInstall') && $tmp->onInstall()) {
                     if(!@is_link($install_dir.'/server/plugins-enabled/'.$file)) @symlink($install_dir.'/server/plugins-available/'.$file, $install_dir.'/server/plugins-enabled/'.$file);
                     if(!@is_link($install_dir.'/server/plugins-enabled/'.$file)) {
                        @symlink($install_dir.'/server/plugins-available/'.$file, $install_dir.'/server/plugins-enabled/'.$file);
                        //@symlink($install_dir.'/server/plugins-available/'.$file, '../plugins-enabled/'.$file);
                     }
                     if (strpos($file, '_core_plugin') !== false) {
                        if(!@is_link($install_dir.'/server/plugins-core/'.$file)) @symlink($install_dir.'/server/plugins-available/'.$file, $install_dir.'/server/plugins-core/'.$file);
                        if(!@is_link($install_dir.'/server/plugins-core/'.$file)) {
                           @symlink($install_dir.'/server/plugins-available/'.$file, $install_dir.'/server/plugins-core/'.$file);
                           //@symlink($install_dir.'/server/plugins-available/'.$file, '../plugins-core/'.$file);
                        }
                     }
                  }
                  unset($tmp);
@@ -1624,4 +1641,4 @@
   }
}
?>
?>