From 49ff638e2026471a480f74f2a5cf24461c57a46e Mon Sep 17 00:00:00 2001 From: "Florian Aders (EleRas)" Date: Wed, 3 Mar 2010 18:36:50 +0000 Subject: [PATCH] Create logfiles if they do not exist, fixes #46 --- scripts/jobs/cron_tasks.inc.http.10.apache.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/jobs/cron_tasks.inc.http.10.apache.php b/scripts/jobs/cron_tasks.inc.http.10.apache.php index c3b9901c..30f9cc93 100644 --- a/scripts/jobs/cron_tasks.inc.http.10.apache.php +++ b/scripts/jobs/cron_tasks.inc.http.10.apache.php @@ -387,10 +387,14 @@ class apache { // The normal access/error - logging is enabled $error_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log'); + // Create the logfile if it does not exist (fixes #46) + touch($error_log); chown($error_log, $this->settings['system']['httpuser']); chgrp($error_log, $this->settings['system']['httpgroup']); $access_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log'); + // Create the logfile if it does not exist (fixes #46) + touch($access_log); chown($access_log, $this->settings['system']['httpuser']); chgrp($access_log, $this->settings['system']['httpgroup']);