From a204303e5099dcb88e5e4760a09e7de9a96c4ea3 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Fri, 17 Oct 2014 08:05:51 -0400
Subject: [PATCH] moved "function send_notification_email" from 300-quota_notify.inc.php to monitor_tools.inc.php

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

diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php
index 75afe95..a518cac 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') {
@@ -228,7 +231,7 @@
 					$job['command'] = str_replace('[web_root]', $web_root, $job['command']);
 
 					$command .= "\t";
-					if($job['type'] != 'chrooted' && substr($job['command'], 0, 1) != "/") $command .= $this->parent_domain['document_root'].'/';
+					//if($job['type'] != 'chrooted' && substr($job['command'], 0, 1) != "/") $command .= $this->parent_domain['document_root'].'/';
 					$command .= $job['command'] . " " . $log_target;
 				}
 

--
Gitblit v1.9.1