Skip to content
Permalink
Browse files

Remove awstats. Also some modperl cleanup in WRE::Site.

  • Loading branch information...
perlDreamer committed Jan 5, 2012
1 parent 4118a05 commit 6d49e1df6dde97263f5904e399f164e533de9868
Showing with 0 additions and 1,518 deletions.
  1. +0 −17 wre/lib/WRE/Site.pm
  2. +0 −21 wre/sbin/wreconsole.pl
  3. +0 −1,471 wre/var/setupfiles/awstats.template
  4. +0 −9 wre/var/setupfiles/stats.modproxy
@@ -119,7 +119,6 @@ sub create {
);

# create webroot
$file->makePath($wreConfig->getDomainRoot('/'.$sitename.'/awstats'));
$file->makePath($wreConfig->getDomainRoot('/'.$sitename.'/logs'));
$file->makePath($wreConfig->getDomainRoot('/'.$sitename.'/public'));
my $uploads = $wreConfig->getDomainRoot('/'.$sitename.'/public/uploads/');
@@ -128,16 +127,6 @@ sub create {
$wreConfig->getDomainRoot('/'.$sitename.'/public/uploads/'),
{ recursive => 1, force=>1 });

# create awstats config
$file->copy($wreConfig->getRoot("/var/awstats.template"),
$wreConfig->getRoot("/etc/awstats.".$sitename.".conf"),
{ templateVars => $params, force => 1 });

# create modperl config
$file->copy($wreConfig->getRoot("/var/modperl.template"),
$wreConfig->getRoot("/etc/".$sitename.".modperl"),
{ templateVars => $params, force => 1 });

# create nginx config
$file->copy($wreConfig->getRoot("/var/nginx.template"),
$wreConfig->getRoot("/etc/".$sitename.".nginx"),
@@ -279,12 +268,6 @@ sub delete {
# web root
$file->delete($wreConfig->getDomainRoot("/".$sitename));

# awstats
$file->delete($wreConfig->getRoot("/etc/awstats.".$sitename.".conf"));

# modperl
$file->delete($wreConfig->getRoot("/etc/".$sitename.".modperl"));

# nginx
$file->delete($wreConfig->getRoot("/etc/".$sitename.".nginx"));

@@ -762,19 +762,6 @@ sub www_editSite {
<textarea name="modperl">'.$$contents.'</textarea><br />
<input type="submit" class="saveButton" value="Save" /> <br /><br />
';
$$contents = '';
eval { $contents = $file->slurp($state->{config}->getRoot("/etc/awstats.".$sitename.".conf")) };
if ($@) {
carp "Couldn't open awstats.$sitename.conf file for editing $@";
$content .= '<div class="status">'.$@.'</div>';
}
makeHtmlFormSafe($contents);
$content .= '
<div><b>awstats.'.$sitename.'.conf</b></div>
<textarea name="awstats">'.$$contents.'</textarea><br />
<input type="submit" class="saveButton" value="Save" />
</form>
';
sendResponse($state, $content);
}

@@ -805,11 +792,6 @@ sub www_editSiteSave {
$status = "Couldn't save $sitename.modperl. $@";
carp $status;
}
eval { $file->spit($state->{config}->getRoot("/etc/awstats.".$sitename.".conf"), $state->{cgi}->param("awstats")) };
if ($@) {
$status = "Couldn't save awstats.$sitename.conf. $@";
carp $status;
}
www_listSites($state, $status);
}

@@ -1263,9 +1245,6 @@ sub www_setup {
$file->copy($config->getRoot("/var/setupfiles/nginx.template"),
$config->getRoot("/var/nginx.template"),
{ force => 1 });
$file->copy($config->getRoot("/var/setupfiles/awstats.template"),
$config->getRoot("/var/awstats.template"),
{ force => 1 });
$file->copy($config->getRoot("/var/setupfiles/wre.logrotate"),
$config->getRoot("/var/wre.logrotate"),
{ force => 1 });
Oops, something went wrong.

0 comments on commit 6d49e1d

Please sign in to comment.
You can’t perform that action at this time.