From 30aa0891b8ef7204b899d90bf3757a5a1881d044 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 01 Nov 2007 16:54:45 -0400
Subject: [PATCH] - Enhanced the installation guides - added a daily cronjob for stats creation in the installer. - Fixed a bug in the spamfilter white / blacklist forms (thanks to satommy for reporting this) - fixed ssl cert path in vhost templates/web_domain_ssl.htm - fixed a bug in the apache plugin which prevented the copying of the standard error and index files.

---
 INSTALL_DEBIAN.txt                               |    1 +
 server/conf/vhost.conf.master                    |    6 +++---
 interface/web/mail/spamfilter_whitelist_edit.php |    2 +-
 install/lib/installer_base.lib.php               |    5 ++++-
 interface/web/sites/templates/web_domain_ssl.htm |    6 +++---
 server/plugins-enabled/apache2_plugin.inc.php    |    5 ++++-
 interface/web/mail/spamfilter_blacklist_edit.php |    2 +-
 server/cron_daily.sh                             |    5 +++++
 INSTALL_UBUNTU.txt                               |    1 +
 9 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/INSTALL_DEBIAN.txt b/INSTALL_DEBIAN.txt
index d08a87d..e4dcc85 100644
--- a/INSTALL_DEBIAN.txt
+++ b/INSTALL_DEBIAN.txt
@@ -29,6 +29,7 @@
 
 a2enmod suexec
 a2enmod rewrite
+a2enmod ssl
 
 4) Install pure-ftpd and quota
 
diff --git a/INSTALL_UBUNTU.txt b/INSTALL_UBUNTU.txt
index 765a3de..916396b 100644
--- a/INSTALL_UBUNTU.txt
+++ b/INSTALL_UBUNTU.txt
@@ -41,6 +41,7 @@
 
 a2enmod suexec
 a2enmod rewrite
+a2enmod ssl
 
 4) Install pure-ftpd and quota
 
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 22d8ab4..fab5277 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -648,7 +648,10 @@
 		exec('crontab -u root -l > crontab.txt');
 		$existing_root_cron_jobs = file('crontab.txt');
 		
-		$root_cron_jobs = array('* * * * * /usr/local/ispconfig/server/server.sh &> /dev/null');
+		$root_cron_jobs = array(
+			'* * * * * /usr/local/ispconfig/server/server.sh &> /dev/null',
+			'30 00 * * * /usr/local/ispconfig/server/cron_daily.sh &> /dev/null'
+		);
 		foreach($root_cron_jobs as $cron_job) {
 			if(!in_array($cron_job."\n", $existing_root_cron_jobs)) {
 				$existing_root_cron_jobs[] = $cron_job."\n";
diff --git a/interface/web/mail/spamfilter_blacklist_edit.php b/interface/web/mail/spamfilter_blacklist_edit.php
index e4772da..729c23e 100644
--- a/interface/web/mail/spamfilter_blacklist_edit.php
+++ b/interface/web/mail/spamfilter_blacklist_edit.php
@@ -63,7 +63,7 @@
 			$client = $app->db->queryOneRecord("SELECT limit_spamfilter_wblist FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
 			
 			// Check if the user may add another mailbox.
-			if($client["limit_limit_spamfilter_wblist"] >= 0) {
+			if($client["limit_spamfilter_wblist"] >= 0) {
 				$tmp = $app->db->queryOneRecord("SELECT count(wblist_id) as number FROM spamfilter_wblist WHERE sys_groupid = $client_group_id");
 				if($tmp["number"] >= $client["limit_spamfilter_wblist"]) {
 					$app->error($app->tform->wordbook["limit_spamfilter_wblist_txt"]);
diff --git a/interface/web/mail/spamfilter_whitelist_edit.php b/interface/web/mail/spamfilter_whitelist_edit.php
index fb2a5ef..3630986 100644
--- a/interface/web/mail/spamfilter_whitelist_edit.php
+++ b/interface/web/mail/spamfilter_whitelist_edit.php
@@ -63,7 +63,7 @@
 			$client = $app->db->queryOneRecord("SELECT limit_spamfilter_wblist FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
 			
 			// Check if the user may add another mailbox.
-			if($client["limit_limit_spamfilter_wblist"] >= 0) {
+			if($client["limit_spamfilter_wblist"] >= 0) {
 				$tmp = $app->db->queryOneRecord("SELECT count(wblist_id) as number FROM spamfilter_wblist WHERE sys_groupid = $client_group_id");
 				if($tmp["number"] >= $client["limit_spamfilter_wblist"]) {
 					$app->error($app->tform->wordbook["limit_spamfilter_wblist_txt"]);
diff --git a/interface/web/sites/templates/web_domain_ssl.htm b/interface/web/sites/templates/web_domain_ssl.htm
index c3f2b45..f43101b 100644
--- a/interface/web/sites/templates/web_domain_ssl.htm
+++ b/interface/web/sites/templates/web_domain_ssl.htm
@@ -21,15 +21,15 @@
   </tr>
   <tr>
     <td class="frmText11">{tmpl_var name='ssl_request_txt'}:</td>
-    <td class="frmText11"><textarea name='ssl_request' cols='30' rows='10'>{tmpl_var name='ssl_request'}</textarea></td>
+    <td class="frmText11"><textarea name='ssl_request' cols='50' rows='10'>{tmpl_var name='ssl_request'}</textarea></td>
   </tr>
   <tr>
     <td class="frmText11">{tmpl_var name='ssl_cert_txt'}:</td>
-    <td class="frmText11"><textarea name='ssl_cert' cols='30' rows='10'>{tmpl_var name='ssl_cert'}</textarea></td>
+    <td class="frmText11"><textarea name='ssl_cert' cols='50' rows='10'>{tmpl_var name='ssl_cert'}</textarea></td>
   </tr>
   <tr>
     <td class="frmText11">{tmpl_var name='ssl_bundle_txt'}:</td>
-    <td class="frmText11"><textarea name='ssl_bundle' cols='30' rows='10'>{tmpl_var name='ssl_bundle'}</textarea></td>
+    <td class="frmText11"><textarea name='ssl_bundle' cols='50' rows='10'>{tmpl_var name='ssl_bundle'}</textarea></td>
   </tr>
   <tr>
     <td class="frmText11">{tmpl_var name='ssl_action_txt'}:</td>
diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index d5199de..afd65ba 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -81,10 +81,10 @@
 	ErrorDocument 503 /error/overloaded.html
 	
 	SSLEngine on
-	SSLCertificateFile <tmpl_var name='document_root'>/<tmpl_var name='domain'>.crt
-	SSLCertificateKeyFile <tmpl_var name='document_root'>/<tmpl_var name='domain'>.key
+	SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.crt
+	SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.key
 <tmpl_if name='has_bundle_cert'>
-	SSLCACertificateFile <tmpl_var name='document_root'>/<tmpl_var name='domain'>.bundle
+	SSLCACertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.bundle
 </tmpl_if>
 
 <tmpl_if name='alias'>
diff --git a/server/cron_daily.sh b/server/cron_daily.sh
new file mode 100644
index 0000000..77a0a2f
--- /dev/null
+++ b/server/cron_daily.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
+
+/usr/bin/php -q /usr/local/ispconfig/server/cron_daily.php
\ No newline at end of file
diff --git a/server/plugins-enabled/apache2_plugin.inc.php b/server/plugins-enabled/apache2_plugin.inc.php
index a167014..41342bb 100644
--- a/server/plugins-enabled/apache2_plugin.inc.php
+++ b/server/plugins-enabled/apache2_plugin.inc.php
@@ -235,9 +235,12 @@
 		}
 		
 		// Copy the error pages
-		$error_page_path = escapeshellcmd($data["new"]["web_document_root"])."/web/error/";
+		$error_page_path = escapeshellcmd($data["new"]["document_root"])."/web/error/";
 		exec("cp /usr/local/ispconfig/server/conf/error/".substr(escapeshellcmd($conf["language"]),0,2)."/* ".$error_page_path);
 		
+		// copy the standard index page
+		exec("cp /usr/local/ispconfig/server/conf/index/standard_index.html_".substr(escapeshellcmd($conf["language"]),0,2)." ".escapeshellcmd($data["new"]["document_root"])."/web/");
+		
 		// Create group and user, if not exist
 		$app->uses("system");
 		

--
Gitblit v1.9.1