fixing bug where old awstats - config will not be removed due to check on wrong panel - name
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user