File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -770,11 +770,11 @@ public function install_crontab()
770770 exec ('crontab -u getmail -l > crontab.txt ' );
771771 $ existing_cron_jobs = file ('crontab.txt ' );
772772
773- $ cron_jobs = array ('*/5 * * * * ' .$ cf ['program ' ].' -g ' .$ cf ['config_dir ' ].' -r ' .$ cf ['config_dir ' ].'/*.conf &> /dev/null ' );
773+ $ cron_jobs = array ('*/5 * * * * ' .$ cf ['program ' ].' -n - g ' .$ cf ['config_dir ' ].' -r ' .$ cf ['config_dir ' ].'/*.conf &> /dev/null ' );
774774
775775 // remove existing ispconfig cronjobs, in case the syntax has changed
776776 foreach ($ cron_jobs as $ key => $ val ) {
777- if (stristr ($ val ,$ cf ['program ' ])) unset($ cron_jobs [$ key ]);
777+ if (stristr ($ val ,$ cf ['program ' ])) unset($ existing_cron_jobs [$ key ]);
778778 }
779779
780780 foreach ($ cron_jobs as $ cron_job ) {
@@ -786,6 +786,9 @@ public function install_crontab()
786786 exec ('crontab -u getmail crontab.txt &> /dev/null ' );
787787 unlink ('crontab.txt ' );
788788 }
789+
790+ exec ('touch /var/log/ispconfig/cron.log ' );
791+ exec ('chmod +666 /var/log/ispconfig/cron.log ' );
789792 }
790793
791794}
Original file line number Diff line number Diff line change @@ -789,11 +789,11 @@ public function install_crontab()
789789 exec ('crontab -u getmail -l > crontab.txt ' );
790790 $ existing_cron_jobs = file ('crontab.txt ' );
791791
792- $ cron_jobs = array ('*/5 * * * * ' .$ cf ['program ' ].' -g ' .$ cf ['config_dir ' ].' -r ' .$ cf ['config_dir ' ].'/*.conf &> /dev/null ' );
792+ $ cron_jobs = array ('*/5 * * * * ' .$ cf ['program ' ].' -n - g ' .$ cf ['config_dir ' ].' -r ' .$ cf ['config_dir ' ].'/*.conf &> /dev/null ' );
793793
794794 // remove existing ispconfig cronjobs, in case the syntax has changed
795795 foreach ($ cron_jobs as $ key => $ val ) {
796- if (stristr ($ val ,$ cf ['program ' ])) unset($ cron_jobs [$ key ]);
796+ if (stristr ($ val ,$ cf ['program ' ])) unset($ existing_cron_jobs [$ key ]);
797797 }
798798
799799 foreach ($ cron_jobs as $ cron_job ) {
@@ -805,6 +805,9 @@ public function install_crontab()
805805 exec ('crontab -u getmail crontab.txt &> /dev/null ' );
806806 unlink ('crontab.txt ' );
807807 }
808+
809+ exec ('touch /var/log/ispconfig/cron.log ' );
810+ exec ('chmod +666 /var/log/ispconfig/cron.log ' );
808811 }
809812
810813}
You can’t perform that action at this time.
0 commit comments