From 182e2d31492a8b2ff42f578bc87df8f35c712597 Mon Sep 17 00:00:00 2001
From: fantu <fantu@ispconfig3>
Date: Sun, 21 Dec 2008 10:54:17 -0500
Subject: [PATCH] italian update

---
 install/lib/installer_base.lib.php |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index d75df9c..1e8c1cf 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -699,6 +699,15 @@
 			replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0);
 		}
 		
+		//* Copy the ISPConfig configuration include
+        $vhost_conf_dir = $conf['apache']['vhost_conf_dir'];
+        $vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
+        
+		copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
+		if(!@is_link($vhost_conf_enabled_dir."/000-ispconfig.conf")) {
+			exec("ln -s ".$vhost_conf_dir."/ispconfig.conf ".$vhost_conf_enabled_dir."/000-ispconfig.conf");
+		}
+		
 	}
 	
 	public function configure_firewall()
@@ -728,6 +737,12 @@
     		$tcp_public_services = '21 22 25 53 80 110 443 3306 8080 10000';
     		$udp_public_services = '53';
   		}
+		
+		if(!stristr($tcp_public_services, $conf['apache']['vhost_port'])) {
+			$tcp_public_services .= ' '.intval($conf['apache']['vhost_port']);
+			if($row["tcp_port"] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ',".intval($conf['apache']['vhost_port'])."' WHERE server_id = ".intval($conf['server_id']));
+		}
+		
   		$content = str_replace("{TCP_PUBLIC_SERVICES}", $tcp_public_services, $content);
   		$content = str_replace("{UDP_PUBLIC_SERVICES}", $udp_public_services, $content);
 
@@ -1028,8 +1043,8 @@
 		}
 		
 		$root_cron_jobs = array(
-			'* * * * * /usr/local/ispconfig/server/server.sh > /dev/null',
-			'30 00 * * * /usr/local/ispconfig/server/cron_daily.sh > /dev/null'
+			'* * * * * /usr/local/ispconfig/server/server.sh > /dev/null 2>> /var/log/ispconfig/cron.log',
+			'30 00 * * * /usr/local/ispconfig/server/cron_daily.sh > /dev/null 2>> /var/log/ispconfig/cron.log'
 		);
 		foreach($root_cron_jobs as $cron_job) {
 			if(!in_array($cron_job."\n", $existing_root_cron_jobs)) {
@@ -1046,7 +1061,9 @@
 			exec('crontab -u getmail -l > crontab.txt');
 			$existing_cron_jobs = file('crontab.txt');
 		
-			$cron_jobs = array('*/5 * * * * '.$cf['program'].' -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf > /dev/null');
+			$cron_jobs = array(
+                '*/5 * * * * '.$cf['program'].' -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) {

--
Gitblit v1.9.1