tbrehm
2009-03-04 4c7fd5c32c2bd0d8dd18543ea10f930aca0a7843
install/lib/installer_base.lib.php
@@ -702,8 +702,8 @@
      }
      
      if(is_file('/etc/apache2/sites-enabled/000-default')) {
         replaceLine('/etc/apache2/sites-available/000-default','NameVirtualHost *','NameVirtualHost *:80',1);
         replaceLine('/etc/apache2/sites-available/000-default','<VirtualHost *>','<VirtualHost *:80>',1);
         replaceLine('/etc/apache2/sites-available/000-default','NameVirtualHost *','NameVirtualHost *:80',1,0);
         replaceLine('/etc/apache2/sites-available/000-default','<VirtualHost *>','<VirtualHost *:80>',1,0);
      }
      
      if(is_file('/etc/apache2/ports.conf')) {
@@ -991,17 +991,15 @@
         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");
         }
      }
      if(!is_file('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter')) {
         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');
         
      }
      // Make the Clamav log files readable by ISPConfig
      exec('chmod +r /var/log/clamav/clamav.log');
      exec('chmod +r /var/log/clamav/freshclam.log');
      
      //* Install the SVN update script
      exec('cp ../helper_scripts/update_from_svn.sh /usr/local/bin/ispconfig_update_from_svn.sh');
@@ -1013,6 +1011,8 @@
      if(@is_file('/var/log/mail.warn')) exec('chmod +r /var/log/mail.warn');
      if(@is_file('/var/log/mail.err')) exec('chmod +r /var/log/mail.err');
      if(@is_file('/var/log/messages')) exec('chmod +r /var/log/messages');
      if(@is_file('/var/log/clamav/clamav.log')) exec('chmod +r /var/log/clamav/clamav.log');
      if(@is_file('/var/log/clamav/freshclam.log')) exec('chmod +r /var/log/clamav/freshclam.log');
      
      //* Create the ispconfig log directory
      if(!is_dir('/var/log/ispconfig')) mkdir('/var/log/ispconfig');
@@ -1078,12 +1078,12 @@
         $existing_cron_jobs = file('crontab.txt');
      
         $cron_jobs = array(
                '*/5 * * * * '.$cf['program'].' -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf > /dev/null 2>> /var/log/ispconfig/cron.log'
                '*/5 * * * * '.$cf['program'].' -n -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf > /dev/null 2>> /var/log/ispconfig/cron.log'
            );
      
         // remove existing ispconfig cronjobs, in case the syntax has changed
         foreach($cron_jobs as $key => $val) {
            if(stristr($val,$cf['program'])) unset($cron_jobs[$key]);
            if(stristr($val,$cf['program'])) unset($existing_cron_jobs[$key]);
         }
      
         foreach($cron_jobs as $cron_job) {
@@ -1095,6 +1095,10 @@
         exec('crontab -u getmail crontab.txt &> /dev/null');
         unlink('crontab.txt');
      }
      exec('touch /var/log/ispconfig/cron.log');
      exec('chmod 666 /var/log/ispconfig/cron.log');
   }
   
}