tbrehm
2009-03-01 1ba01fe1bd9257c154ccf6a810ebb0fc7b29dfd4
install/dist/lib/fedora.lib.php
@@ -163,8 +163,13 @@
      $content = str_replace('#  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}', 
                   '  flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
                     $content);
      // If postfix package is from centos plus repo
      $content = str_replace('#  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}', 
                   '  flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
                     $content);
      $content = str_replace('  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}',
                   '  flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
                     $content);
      
@@ -398,6 +403,11 @@
   public function configure_apache()
    {   
      global $conf;
      if(is_file('/etc/suphp.conf')) {
         replaceLine('/etc/suphp.conf','php=php:/usr/bin','x-httpd-suphp=php:/usr/bin/php-cgi',0);
         replaceLine('/etc/suphp.conf','docroot=','docroot=/var/clients',0);
      }
      
      //* Create the logging directory for the vhost logfiles
      exec('mkdir -p /var/log/ispconfig/httpd');
@@ -682,6 +692,22 @@
         if(!@is_link("$vhost_conf_enabled_dir/000-ispconfig.vhost")) {
            exec("ln -s $vhost_conf_dir/ispconfig.vhost $vhost_conf_enabled_dir/000-ispconfig.vhost");
         }
         exec('mkdir -p /var/www/php-fcgi-scripts/ispconfig');
         exec('cp tpl/apache_ispconfig_fcgi_starter.master /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
         exec('chmod +x /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
         exec('ln -s /usr/local/ispconfig/interface/web /var/www/ispconfig');
         exec('chown -R ispconfig:ispconfig /var/www/php-fcgi-scripts/ispconfig');
      }
      //copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
      //* and create the symlink
      if($this->install_ispconfig_interface == true && $this->is_update == false) {
         if(@is_link("$vhost_conf_enabled_dir/ispconfig.vhost")) unlink("$vhost_conf_enabled_dir/ispconfig.vhost");
         if(!@is_link("$vhost_conf_enabled_dir/000-ispconfig.vhost")) {
            exec("ln -s $vhost_conf_dir/ispconfig.vhost $vhost_conf_enabled_dir/000-ispconfig.vhost");
         }
      }
      
      // Make the Clamav log files readable by ISPConfig
@@ -693,8 +719,8 @@
      exec('chown root /usr/local/bin/ispconfig_update_from_svn.sh');
      exec('chmod 700 /usr/local/bin/ispconfig_update_from_svn.sh');
      
      //set the fast cgi starter script to executable
      exec('chmod 755 '.$install_dir.'/interface/bin/php-fcgi');
      // set the fast cgi starter script to executable
      // exec('chmod 755 '.$install_dir.'/interface/bin/php-fcgi');
      
      //* Make the logs readable for the ispconfig user
      if(@is_file('/var/log/maillog')) exec('chmod +r /var/log/maillog');
@@ -788,7 +814,7 @@
      }
      
      exec('touch /var/log/ispconfig/cron.log');
      exec('chmod +666 /var/log/ispconfig/cron.log');
      exec('chmod 666 /var/log/ispconfig/cron.log');
   }
}