- chown newly created awstats-directory when new domain has been created, fixes #258
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
* @return null
|
||||
*/
|
||||
|
||||
function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot)
|
||||
function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot, $awstats_params = array())
|
||||
{
|
||||
global $pathtophpfiles, $settings;
|
||||
|
||||
@@ -41,6 +41,8 @@ function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot
|
||||
{
|
||||
safe_exec('mkdir -p '.escapeshellarg($awstats_dir));
|
||||
}
|
||||
// chown created folder, #258
|
||||
makeChownWithNewStats($awstats_params);
|
||||
|
||||
// weird but could happen...
|
||||
if(!is_dir($settings['system']['awstats_conf']))
|
||||
|
||||
@@ -611,7 +611,13 @@ class apache
|
||||
|
||||
// After inserting the AWStats information,
|
||||
// be sure to build the awstats conf file as well
|
||||
createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot']);
|
||||
// and chown it using $awstats_params, #258
|
||||
$awstats_param = array(
|
||||
'loginname' => $domain['loginname'],
|
||||
'guid' => $domain['guid'],
|
||||
'documentroot' => $domain['documentroot']
|
||||
);
|
||||
createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot'], $awstats_params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -557,7 +557,13 @@ class lighttpd
|
||||
|
||||
// After inserting the AWStats information,
|
||||
// be sure to build the awstats conf file as well
|
||||
createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot']);
|
||||
// and chown it using $awstats_params, #258
|
||||
$awstats_param = array(
|
||||
'loginname' => $domain['loginname'],
|
||||
'guid' => $domain['guid'],
|
||||
'documentroot' => $domain['documentroot']
|
||||
);
|
||||
createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot'], $awstats_param);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user