tbrehm
2012-01-10 5061c0a82fb7edb742515699864106b27a1ca4c3
Improved awstats script.
1 files modified
10 ■■■■ changed files
server/cron_daily.php 10 ●●●● patch | view | raw | blame | history
server/cron_daily.php
@@ -240,16 +240,16 @@
        rename($rec['document_root'].'/web/stats/awstats.'.$domain.'.html',$rec['document_root'].'/web/stats/awsindex.html');
        if(!is_file($rec['document_root']."/web/stats/index.php")) copy("/usr/local/ispconfig/server/conf/awstats_index.php.master",$rec['document_root']."/web/stats/index.php");
        
        if(is_file($rec['document_root']."/web/stats/index.php")) {
            chown($rec['document_root']."/web/stats/index.php",$rec['system_user']);
            chgrp($rec['document_root']."/web/stats/index.php",$rec['system_group']);
        }
        $app->log('Created awstats statistics with command: '.$command,LOGLEVEL_DEBUG);
    } else {
        $app->log("No awstats statistics created. Either $awstats_pl or $awstats_buildstaticpages_pl is not owned by root user.",LOGLEVEL_WARN);
    }
    
    if(is_file($rec['document_root']."/web/stats/index.php")) {
        chown($rec['document_root']."/web/stats/index.php",$rec['system_user']);
        chgrp($rec['document_root']."/web/stats/index.php",$rec['system_group']);
    }
}