From 08caf719829ee851e2dde692d7f0e7c2771fe41d Mon Sep 17 00:00:00 2001
From: redray <redray@ispconfig3>
Date: Sun, 09 Nov 2008 09:25:53 -0500
Subject: [PATCH] added icons to the lists

---
 install/lib/installer_base.lib.php |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index c1780d9..1a2fd6f 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -35,6 +35,7 @@
 	var $db;
 	public $conf;
 	public $install_ispconfig_interface = true;
+	
 
 
     public function __construct()
@@ -368,8 +369,10 @@
 		wf($cf['vmail_mailbox_base'].'/.'.$configfile, $content);
 		
 		//* Create the directory for the custom mailfilters
-		$command = 'mkdir '.$cf['vmail_mailbox_base'].'/mailfilters';
-		caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
+		if(!is_dir($cf['vmail_mailbox_base'].'/mailfilters')) {
+			$command = 'mkdir '.$cf['vmail_mailbox_base'].'/mailfilters';
+			caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
+		}
 		
 		//* Chmod and chown the .mailfilter file
 		$command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter';
@@ -407,7 +410,10 @@
 		if(is_file($configfile.'~')) exec('chmod 400 '.$configfile.'~');
 		$content = rf($configfile);
 		$content = str_replace('START=no','START=yes',$content);
+		// Debian
 		$content = str_replace('OPTIONS="-c"','OPTIONS="-m /var/spool/postfix/var/run/saslauthd -r"',$content);
+		// Ubuntu
+		$content = str_replace('OPTIONS="-c -m /var/run/saslauthd"','OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"',$content);
 		wf($configfile,$content);
 		
 		// Edit the file /etc/init.d/saslauthd
@@ -415,6 +421,9 @@
 		$content = rf($configfile);
 		$content = str_replace('PIDFILE=$RUN_DIR/saslauthd.pid','PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"',$content);
 		wf($configfile,$content);
+		
+		// add the postfix user to the sasl group (at least nescessary for ubuntu 8.04 and most likely debian lenny too.
+		exec('adduser postfix sasl');
 		
 		
 	}
@@ -610,6 +619,11 @@
 		//* Create the logging directory for the vhost logfiles
 		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','docroot=','docroot=/var/clients',0);
+		}
+		
 	}
 	
 	public function configure_firewall()
@@ -736,6 +750,9 @@
 				while (($file = readdir($dh)) !== false) {
 					if($file != '.' && $file != '..') {
 						if(!@is_link($install_dir.'/server/mods-enabled/'.$file)) @symlink($install_dir.'/server/mods-available/'.$file, $install_dir.'/server/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);
+						}
 					}
 				}
 				closedir($dh);
@@ -748,6 +765,9 @@
 				while (($file = readdir($dh)) !== false) {
 					if($file != '.' && $file != '..') {
 						if(!@is_link($install_dir.'/server/plugins-enabled/'.$file)) @symlink($install_dir.'/server/plugins-available/'.$file, $install_dir.'/server/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);
+						}
 					}
 				}
 				closedir($dh);

--
Gitblit v1.9.1