File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1079,12 +1079,12 @@ public function install_crontab()
10791079 $ existing_cron_jobs = file ('crontab.txt ' );
10801080
10811081 $ cron_jobs = array (
1082- '*/5 * * * * ' .$ cf ['program ' ].' -g ' .$ cf ['config_dir ' ].' -r ' .$ cf ['config_dir ' ].'/*.conf > /dev/null 2>> /var/log/ispconfig/cron.log '
1082+ '*/5 * * * * ' .$ cf ['program ' ].' -n - g ' .$ cf ['config_dir ' ].' -r ' .$ cf ['config_dir ' ].'/*.conf > /dev/null 2>> /var/log/ispconfig/cron.log '
10831083 );
10841084
10851085 // remove existing ispconfig cronjobs, in case the syntax has changed
10861086 foreach ($ cron_jobs as $ key => $ val ) {
1087- if (stristr ($ val ,$ cf ['program ' ])) unset($ cron_jobs [$ key ]);
1087+ if (stristr ($ val ,$ cf ['program ' ])) unset($ existing_cron_jobs [$ key ]);
10881088 }
10891089
10901090 foreach ($ cron_jobs as $ cron_job ) {
@@ -1096,6 +1096,10 @@ public function install_crontab()
10961096 exec ('crontab -u getmail crontab.txt &> /dev/null ' );
10971097 unlink ('crontab.txt ' );
10981098 }
1099+
1100+ exec ('touch /var/log/ispconfig/cron.log ' );
1101+ exec ('chmod +666 /var/log/ispconfig/cron.log ' );
1102+
10991103 }
11001104
11011105}
You can’t perform that action at this time.
0 commit comments