From 39dd4ecc8b4a2b3b98a7ffe7056ae64240b22d56 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Sun, 11 May 2014 17:39:37 -0400
Subject: [PATCH] - Added functions client_get_emailcontact and client_login_get to remote api. - Add option to _get functions of the remote-api to return all records when primaryID = -1 - Fixed permission problem in _get functions of remote api. - Fixed typo in german dashboard language file.

---
 server/plugins-available/cron_plugin.inc.php |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php
index 32e1a0b..d02b1fd 100644
--- a/server/plugins-available/cron_plugin.inc.php
+++ b/server/plugins-available/cron_plugin.inc.php
@@ -203,16 +203,19 @@
 				}
 				
 				$log_target = ">/dev/null 2>&1";
+				$log_wget_target = '/dev/null';
+				$log_root = '';
 				if($job['log'] == 'y') {
-					$log_root = '';
-					if($job['type'] != 'chrooted') $log_root = $this->parent_domain['document_root'] . '/log';
+					if($job['type'] != 'chrooted') $log_root = $this->parent_domain['document_root'];
+					$log_root .= '/log';
 					
-					$log_target = '>' . $log_root . '/cron.log 2>' . $log_root . '/cron_error.log';
+					$log_target = '>>' . $log_root . '/cron.log 2>>' . $log_root . '/cron_error.log';
+					$log_wget_target = $log_root . '/cron_wget.log';
 				}
 				
 				$command .= "\t{$this->parent_domain['system_user']}"; //* running as user
 				if($job['type'] == 'url') {
-					$command .= "\t{$cron_config['wget']} -q -t 1 -T 7200 -O /dev/null " . escapeshellarg($job['command']) . " " . $log_target;
+					$command .= "\t{$cron_config['wget']} -q -t 1 -T 7200 -O " . $log_wget_target . " " . escapeshellarg($job['command']) . " " . $log_target;
 				} else {
 					$web_root = '';
 					if($job['type'] == 'chrooted') {
@@ -223,8 +226,6 @@
 					} else {
 						$web_root = $this->parent_domain['document_root'];
 					}
-					
-					$log_root = $web_root . '/';
 					
 					$web_root .= '/web';
 					$job['command'] = str_replace('[web_root]', $web_root, $job['command']);

--
Gitblit v1.9.1