tbrehm
2010-10-26 51a9fb66c6413e0693b58a66c4de3fb802d6215a
install/dist/lib/opensuse.lib.php
@@ -518,7 +518,8 @@
      exec('mkdir -p /var/log/ispconfig/httpd');
      
      //if(is_file('/etc/suphp.conf')) {
      replaceLine('/etc/suphp.conf','php=php','x-httpd-suphp=php:/srv/www/cgi-bin/php5',0,0);
      replaceLine('/etc/suphp.conf','php=php','x-httpd-suphp="php:/srv/www/cgi-bin/php5"',0,0);
      replaceLine('/etc/suphp.conf','php="php','x-httpd-suphp="php:/srv/www/cgi-bin/php5"',0,0);
      replaceLine('/etc/suphp.conf','docroot=','docroot=/srv/www',0,0);
      replaceLine('/etc/suphp.conf','umask=0077','umask=0022',0);
      //}
@@ -540,7 +541,7 @@
      //copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
      $content = rf("tpl/apache_ispconfig.conf.master");
      $records = $this->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ".$conf["server_id"]." AND virtualhost = 'y'");
      if(count($records) > 0) {
      if(is_array($records) && count($records) > 0) {
         foreach($records as $rec) {
            $content .= "NameVirtualHost ".$rec["ip_address"].":80\n";
            $content .= "NameVirtualHost ".$rec["ip_address"].":443\n";
@@ -590,7 +591,7 @@
        $tcp_public_services = '';
        $udp_public_services = '';
      
      $row = $this->db->queryOneRecord("SELECT * FROM firewall WHERE server_id = ".intval($conf['server_id']));
      $row = $this->db->queryOneRecord('SELECT * FROM '.$conf["mysql"]["database"].'.firewall WHERE server_id = '.intval($conf['server_id']));
      
        if(trim($row["tcp_port"]) != '' || trim($row["udp_port"]) != ''){
          $tcp_public_services = trim(str_replace(',',' ',$row["tcp_port"]));
@@ -632,8 +633,7 @@
        unset($iptables_location);
   }
   public function install_ispconfig()
    {
      global $conf;
@@ -710,6 +710,12 @@
      
      wf("$install_dir/server/lib/$configfile", $content);
      
      //* Create the config file for remote-actions (but only, if it does not exist, because
      //  the value is a autoinc-value and so changed by the remoteaction_core_module
      if (!file_exists($install_dir.'/server/lib/remote_action.inc.php')) {
         $content = '<?php' . "\n" . '$maxid_remote_action = 0;' . "\n" . '?>';
         wf($install_dir.'/server/lib/remote_action.inc.php', $content);
      }
      
      //* Enable the server modules and plugins.
      // TODO: Implement a selector which modules and plugins shall be enabled.
@@ -837,6 +843,12 @@
         $content = str_replace('{vhost_port_listen}', '', $content);
      }
      
      if(is_file('/usr/local/ispconfig/interface/ssl/ispserver.crt') && is_file('/usr/local/ispconfig/interface/ssl/ispserver.key')) {
         $content = str_replace('{ssl_comment}', '', $content);
      } else {
         $content = str_replace('{ssl_comment}', '#', $content);
      }
      $content = str_replace('/var/www/', '/srv/www/', $content);
      
      wf("$vhost_conf_dir/ispconfig.vhost", $content);
@@ -895,8 +907,8 @@
      exec('chmod a+rx /usr/local/ispconfig/interface/web');
      
      //* Create the ispconfig log directory
      if(!is_dir('/var/log/ispconfig')) mkdir('/var/log/ispconfig');
      if(!is_file('/var/log/ispconfig/ispconfig.log')) exec('touch /var/log/ispconfig/ispconfig.log');
      if(!is_dir($conf['ispconfig_log_dir'])) mkdir($conf['ispconfig_log_dir']);
      if(!is_file($conf['ispconfig_log_dir'].'/ispconfig.log')) exec('touch '.$conf['ispconfig_log_dir'].'/ispconfig.log');
      
      exec('mv /usr/local/ispconfig/server/scripts/run-getmail.sh /usr/local/bin/run-getmail.sh');
      exec('chown getmail /usr/local/bin/run-getmail.sh');
@@ -986,4 +998,4 @@
}
?>
?>