From 386676a6ae702f5fbbd707fed7afbc65bfd89a3d Mon Sep 17 00:00:00 2001
From: redray <redray@ispconfig3>
Date: Mon, 01 Dec 2008 05:40:22 -0500
Subject: [PATCH] last change didn't work: undo

---
 install/dist/lib/fedora.lib.php |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 1d2b029..3e6c7e8 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -1,7 +1,7 @@
 <?php
 
 /*
-Copyright (c) 2008, Till Brehm, projektfarm Gmbh
+Copyright (c) 2007, Till Brehm, projektfarm Gmbh
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification,
@@ -619,13 +619,22 @@
          
         $content = rf("tpl/apache_ispconfig.vhost.master");
 		$content = str_replace('{vhost_port}', $conf['apache']['vhost_port'], $content);
+		
+		// comment out the listen directive if port is 80 or 443
+		if($conf['apache']['vhost_port'] == 80 or $conf['apache']['vhost_port'] == 443) {
+			$content = str_replace('{vhost_port_listen}', '#', $content);
+		} else {
+			$content = str_replace('{vhost_port_listen}', '', $content);
+		}
+		
 		wf("$vhost_conf_dir/ispconfig.vhost", $content);
 		
 		//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
 		//* and create the symlink
 		if($this->install_ispconfig_interface == true) {
-			if(!@is_link("$vhost_conf_enabled_dir/ispconfig.vhost")) {
-				exec("ln -s $vhost_conf_dir/ispconfig.vhost $vhost_conf_enabled_dir/ispconfig.vhost");
+			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");
 			}
 		}
 		
@@ -654,6 +663,7 @@
 		
 		//* Create the ispconfig log directory
 		if(!is_dir('/var/log/ispconfig')) mkdir('/var/log/ispconfig');
+		if(!is_file('/var/log/ispconfig/ispconfig.log')) exec('touch /var/log/ispconfig/ispconfig.log');
 		
 		
 	}

--
Gitblit v1.9.1