Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Webslice
ISPConfig 3
Commits
a464e1f4
Commit
a464e1f4
authored
Oct 03, 2012
by
tbrehm
Browse files
Fixed: FS#2417 - Custom awstats_index.php.master
parent
7799e8af
Changes
3
Hide whitespace changes
Inline
Side-by-side
server/cron_daily.php
View file @
a464e1f4
...
...
@@ -39,7 +39,7 @@ $conf['server_id'] = intval($conf['server_id']);
// Load required base-classes
$app
->
uses
(
'ini_parser,file,services,getconf'
);
$app
->
uses
(
'ini_parser,file,services,getconf
,system
'
);
#######################################################################################################
...
...
@@ -238,7 +238,13 @@ HostAliases="www.'.$domain.' localhost 127.0.0.1'.$aliasdomain.'"';
exec
(
$command
);
if
(
is_file
(
$rec
[
'document_root'
]
.
'/'
.
$web_folder
.
'/stats/index.html'
))
unlink
(
$rec
[
'document_root'
]
.
'/'
.
$web_folder
.
'/stats/index.html'
);
rename
(
$rec
[
'document_root'
]
.
'/'
.
$web_folder
.
'/stats/awstats.'
.
$domain
.
'.html'
,
$rec
[
'document_root'
]
.
'/'
.
$web_folder
.
'/stats/awsindex.html'
);
if
(
!
is_file
(
$rec
[
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
))
copy
(
"/usr/local/ispconfig/server/conf/awstats_index.php.master"
,
$rec
[
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
);
if
(
!
is_file
(
$rec
[
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
))
{
if
(
file_exists
(
"/usr/local/ispconfig/server/conf-custom/awstats_index.php.master"
))
{
copy
(
"/usr/local/ispconfig/server/conf-custom/awstats_index.php.master"
,
$rec
[
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
);
}
else
{
copy
(
"/usr/local/ispconfig/server/conf/awstats_index.php.master"
,
$rec
[
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
);
}
}
$app
->
log
(
'Created awstats statistics with command: '
.
$command
,
LOGLEVEL_DEBUG
);
}
else
{
...
...
server/plugins-available/apache2_plugin.inc.php
View file @
a464e1f4
...
...
@@ -2271,7 +2271,11 @@ class apache2_plugin {
}
if
(
is_file
(
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.html"
))
$app
->
system
->
unlink
(
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.html"
);
$app
->
system
->
copy
(
"/usr/local/ispconfig/server/conf/awstats_index.php.master"
,
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
);
if
(
file_exists
(
"/usr/local/ispconfig/server/conf-custom/awstats_index.php.master"
))
{
$app
->
system
->
copy
(
"/usr/local/ispconfig/server/conf-custom/awstats_index.php.master"
,
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
);
}
else
{
$app
->
system
->
copy
(
"/usr/local/ispconfig/server/conf/awstats_index.php.master"
,
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
);
}
}
//* Delete the awstats configuration file
...
...
server/plugins-available/nginx_plugin.inc.php
View file @
a464e1f4
...
...
@@ -1792,7 +1792,11 @@ class nginx_plugin {
}
if
(
is_file
(
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.html"
))
$app
->
system
->
unlink
(
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.html"
);
$app
->
system
->
copy
(
"/usr/local/ispconfig/server/conf/awstats_index.php.master"
,
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
);
if
(
file_exists
(
"/usr/local/ispconfig/server/conf-custom/awstats_index.php.master"
))
{
$app
->
system
->
copy
(
"/usr/local/ispconfig/server/conf-custom/awstats_index.php.master"
,
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
);
}
else
{
$app
->
system
->
copy
(
"/usr/local/ispconfig/server/conf/awstats_index.php.master"
,
$data
[
'new'
][
'document_root'
]
.
"/"
.
$web_folder
.
"/stats/index.php"
);
}
}
//* Delete the awstats configuration file
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment