diff --git a/scripts/jobs/cron_tasks.php b/scripts/jobs/cron_tasks.php index 5968b033..cbd560df 100644 --- a/scripts/jobs/cron_tasks.php +++ b/scripts/jobs/cron_tasks.php @@ -54,6 +54,7 @@ while($row = $db->fetch_array($result_tasks)) if ($settings['system']['awstats_enabled'] == '1') { $awstatsclean['header'] = "## GENERATED BY FROXLOR\n"; + $awstatsclean['headerold'] = "## GENERATED BY SYSCP\n"; $awstatsclean['path'] = '/etc/awstats'; /** @@ -74,7 +75,7 @@ while($row = $db->fetch_array($result_tasks)) $awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r'); $awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1); fclose($awstatsclean['fh']); - if($awstatsclean['headerRead'] == $awstatsclean['header']) { + if($awstatsclean['headerRead'] == $awstatsclean['header'] || $awstatsclean['headerRead'] == $awstatsclean['headeroƶd']) { $cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstatsclean['fullentry']." for re-creation"); @unlink($awstatsclean['fullentry']); }