From ae10cf9d440960cd6be6404d307df7bb1cca6abc Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 05 Mar 2009 16:10:48 -0500
Subject: [PATCH] - Changed suse install code and fixed a bug in server.php

---
 install/dist/lib/opensuse.lib.php |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 35c765c..65f60c9 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -430,6 +430,15 @@
 		}
 		unset($content);
 		
+		//* 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()
@@ -701,6 +710,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");
 			}
+			
+			exec('mkdir -p /srv/www/php-fcgi-scripts/ispconfig');
+			exec('cp tpl/apache_ispconfig_fcgi_starter.master /srv/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
+			exec('chmod +x /srv/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
+			exec('ln -s /usr/local/ispconfig/interface/web /srv/www/ispconfig');
+			exec('chown -R ispconfig:ispconfig /srv/www/php-fcgi-scripts/ispconfig');
+			
+			//replaceLine('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter','PHPRC=','PHPRC=/etc/',0,0);
+			
 		}
 		
 		// Make the Clamav log files readable by ISPConfig
@@ -713,7 +731,7 @@
 		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');
+		//exec('chmod 755 '.$install_dir.'/interface/bin/php-fcgi');
 		
 		//* Make the logs readable for the ispconfig user
 		if(@is_file('/var/log/mail.log')) exec('chmod +r /var/log/mail.log');
@@ -807,7 +825,7 @@
 		}
 		
 		exec('touch /var/log/ispconfig/cron.log');
-		exec('chmod +666 /var/log/ispconfig/cron.log');
+		exec('chmod 666 /var/log/ispconfig/cron.log');
 	}
 
 }

--
Gitblit v1.9.1