Skip to content

Commit 6ab2469

Browse files
committedJan 6, 2012
wresetup cleanup, remove unused files, simplify the config passing, setup the demo nginx file.
1 parent eb3e5a4 commit 6ab2469

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed
 

‎wre/sbin/wresetup.pl

+4-18
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,9 @@
1212

1313
use strict;
1414
use lib '/data/wre/lib';
15-
use Carp qw(carp croak);
1615
use WRE::Config;
1716
use WRE::File;
18-
1917
use WRE::Host;
20-
use WRE::Starman;
21-
use WRE::Nginx;
22-
use WRE::Mysql;
23-
use WRE::Site;
24-
use WRE::Spectre;
2518
use Getopt::Long ();
2619
use Pod::Usage ();
2720

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

41-
my $file = WRE::File->new(wreConfig=>$config);
42-
43-
if ($config->get("demo/enabled") == 0 && $cgi->param("enableDemo") == 1) {
44-
$file->makePath($config->getDomainRoot("/demo"));
45-
$file->copy($config->getRoot("/var/setupfiles/demo.nginx"), $config->getRoot("/etc/demo.nginx"),
46-
{ force => 1, templateVars=>{ sitename=>$config->get("demo/hostname") } });
47-
}
35+
$file->makePath($config->getDomainRoot("/demo"));
36+
$file->copy($config->getRoot("/var/setupfiles/demo.nginx"), $config->getRoot("/etc/demo.nginx"),
37+
{ force => 1, templateVars=>{ sitename=>$config->get("demo/hostname") } });
4838
$file->copy($config->getRoot("/var/setupfiles/nginx.conf"),
4939
$config->getRoot("/etc/nginx.conf"),
5040
{ force => 1, templateVars=>{osName=>$host->getOsName} });
@@ -78,10 +68,6 @@ =head1 DESCRIPTION
7868
7969
=over
8070
81-
=item B<--configFile>
82-
83-
The full path to a WRE configuration file.
84-
8571
=item B<--help>
8672
8773
Shows this documentation and then exits.

0 commit comments

Comments
 (0)
Please sign in to comment.