Commit 00d730a9 authored by tbrehm's avatar tbrehm
Browse files

Fixed several getmail crontab errors in opensuse and fedora installer.

parent 37e66149
......@@ -770,11 +770,11 @@ class installer_dist extends installer_base {
exec('crontab -u getmail -l > crontab.txt');
$existing_cron_jobs = file('crontab.txt');
$cron_jobs = array('*/5 * * * * '.$cf['program'].' -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf &> /dev/null');
$cron_jobs = array('*/5 * * * * '.$cf['program'].' -n -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf &> /dev/null');
// remove existing ispconfig cronjobs, in case the syntax has changed
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) {
......@@ -786,6 +786,9 @@ class installer_dist extends installer_base {
exec('crontab -u getmail crontab.txt &> /dev/null');
unlink('crontab.txt');
}
exec('touch /var/log/ispconfig/cron.log');
exec('chmod +666 /var/log/ispconfig/cron.log');
}
}
......
......@@ -789,11 +789,11 @@ class installer_dist extends installer_base {
exec('crontab -u getmail -l > crontab.txt');
$existing_cron_jobs = file('crontab.txt');
$cron_jobs = array('*/5 * * * * '.$cf['program'].' -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf &> /dev/null');
$cron_jobs = array('*/5 * * * * '.$cf['program'].' -n -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf &> /dev/null');
// remove existing ispconfig cronjobs, in case the syntax has changed
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) {
......@@ -805,6 +805,9 @@ class installer_dist extends installer_base {
exec('crontab -u getmail crontab.txt &> /dev/null');
unlink('crontab.txt');
}
exec('touch /var/log/ispconfig/cron.log');
exec('chmod +666 /var/log/ispconfig/cron.log');
}
}
......
Markdown is supported
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