Commit 37e66149 authored by tbrehm's avatar tbrehm
Browse files

Fixed several getmail crontab errors.

parent 3d130ff0
...@@ -1079,12 +1079,12 @@ class installer_base { ...@@ -1079,12 +1079,12 @@ class installer_base {
$existing_cron_jobs = file('crontab.txt'); $existing_cron_jobs = file('crontab.txt');
$cron_jobs = array( $cron_jobs = array(
'*/5 * * * * '.$cf['program'].' -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf > /dev/null 2>> /var/log/ispconfig/cron.log' '*/5 * * * * '.$cf['program'].' -n -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf > /dev/null 2>> /var/log/ispconfig/cron.log'
); );
// remove existing ispconfig cronjobs, in case the syntax has changed // remove existing ispconfig cronjobs, in case the syntax has changed
foreach($cron_jobs as $key => $val) { foreach($cron_jobs as $key => $val) {
if(stristr($val,$cf['program'])) unset($cron_jobs[$key]); if(stristr($val,$cf['program'])) unset($existing_cron_jobs[$key]);
} }
foreach($cron_jobs as $cron_job) { foreach($cron_jobs as $cron_job) {
...@@ -1096,6 +1096,10 @@ class installer_base { ...@@ -1096,6 +1096,10 @@ class installer_base {
exec('crontab -u getmail crontab.txt &> /dev/null'); exec('crontab -u getmail crontab.txt &> /dev/null');
unlink('crontab.txt'); unlink('crontab.txt');
} }
exec('touch /var/log/ispconfig/cron.log');
exec('chmod +666 /var/log/ispconfig/cron.log');
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment