Skip to content
Permalink
Browse files

wresetup cleanup, remove unused files, simplify the config passing, s…

…etup the demo nginx file.
  • Loading branch information...
perlDreamer committed Jan 6, 2012
1 parent eb3e5a4 commit 6ab2469ac89a2ac396a5fb5873cbdbeb37400722
Showing with 4 additions and 18 deletions.
  1. +4 −18 wre/sbin/wresetup.pl
@@ -12,16 +12,9 @@

use strict;
use lib '/data/wre/lib';
use Carp qw(carp croak);
use WRE::Config;
use WRE::File;

use WRE::Host;
use WRE::Starman;
use WRE::Nginx;
use WRE::Mysql;
use WRE::Site;
use WRE::Spectre;
use Getopt::Long ();
use Pod::Usage ();

@@ -37,14 +30,11 @@
# server daemon
my $wreConfig = WRE::Config->new;
my $host = WRE::Host->new(wreConfig => $wreConfig);
my $file = WRE::File->new(wreConfig => $wreConfig);

my $file = WRE::File->new(wreConfig=>$config);

if ($config->get("demo/enabled") == 0 && $cgi->param("enableDemo") == 1) {
$file->makePath($config->getDomainRoot("/demo"));
$file->copy($config->getRoot("/var/setupfiles/demo.nginx"), $config->getRoot("/etc/demo.nginx"),
{ force => 1, templateVars=>{ sitename=>$config->get("demo/hostname") } });
}
$file->makePath($config->getDomainRoot("/demo"));
$file->copy($config->getRoot("/var/setupfiles/demo.nginx"), $config->getRoot("/etc/demo.nginx"),
{ force => 1, templateVars=>{ sitename=>$config->get("demo/hostname") } });
$file->copy($config->getRoot("/var/setupfiles/nginx.conf"),
$config->getRoot("/etc/nginx.conf"),
{ force => 1, templateVars=>{osName=>$host->getOsName} });
@@ -78,10 +68,6 @@ =head1 DESCRIPTION
=over
=item B<--configFile>
The full path to a WRE configuration file.
=item B<--help>
Shows this documentation and then exits.

0 comments on commit 6ab2469

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